Kaipedia kaipawiki https://kaipa.miraheze.org/wiki/Main_Page MediaWiki 1.41.0 first-letter Media Special Talk User User talk Kaipedia Kaipedia talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Module Module talk Item Item talk Property Property talk Main Page 0 1 1 2024-05-10T11:14:54Z MediaWiki default 1 Welcome to Miraheze! wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phorge:|Phorge]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 070d9e6457eab136df99905438a1f57c037772b0 File:Mangalia map.svg 6 2 2 2024-05-10T12:55:51Z NoKiAthami 2 wikitext text/x-wiki Map svg of Mangalia, with its provinces and regions in color bac121c498f367f14ec4e793a80159108f0bc9aa 28 2 2024-05-10T18:36:16Z NoKiAthami 2 NoKiAthami uploaded a new version of [[File:Mangalia map.svg]] wikitext text/x-wiki Map svg of Mangalia, with its provinces and regions in color bac121c498f367f14ec4e793a80159108f0bc9aa 29 28 2024-05-10T18:38:55Z NoKiAthami 2 NoKiAthami uploaded a new version of [[File:Mangalia map.svg]] wikitext text/x-wiki Map svg of Mangalia, with its provinces and regions in color bac121c498f367f14ec4e793a80159108f0bc9aa 30 29 2024-05-10T19:56:48Z NoKiAthami 2 NoKiAthami uploaded a new version of [[File:Mangalia map.svg]] wikitext text/x-wiki Map svg of Mangalia, with its provinces and regions in color bac121c498f367f14ec4e793a80159108f0bc9aa File:Mangalia Flag.png 6 3 3 2024-05-10T13:00:06Z NoKiAthami 2 wikitext text/x-wiki Mangalia flag b4e9e9cbaf9e37e083a7d42b71616d080085f5e8 Template:Infobox country 10 4 4 2024-05-10T14:32:19Z NoKiAthami 2 Created page with "<infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="capital"> <label>Capital</label> </data> <data source="largestcity"> <label>Largest city</label> </data> <data source="languages"> <label>Languages</label> </data> </infobox>" wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="capital"> <label>Capital</label> </data> <data source="largestcity"> <label>Largest city</label> </data> <data source="languages"> <label>Languages</label> </data> </infobox> b324db047e5a4b0036754f411b040de010c74377 9 4 2024-05-10T15:11:00Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="capital"> <label>Capital</label> </data> <data source="largestcity"> <label>Largest city</label> </data> <data source="languages"> <label>Languages</label> </data> </infobox> 3de29498c7a406246ba08038a0651682cb03d478 16 9 2024-05-10T16:35:29Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="capital"> <label>Capital</label> </data> <data source="largestcity"> <label>Largest city</label> </data> <data source="languages"> <label>Languages</label> </data> <data source="typegovernment"> <label>Type of government</label> </data> <data source="ruler"> <label>Ruler</label> </data> </infobox> 1196d74844cb93920feab2cd9664a15eceeb0c9b 17 16 2024-05-10T16:36:43Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="capital"> <label>Capital</label> </data> <data source="largestcity"> <label>Largest city</label> </data> <data source="languages"> <label>Languages</label> </data> <data source="typegovernment"> <label>Type of government</label> </data> <data source="ruler"> <label>Actual Ruler</label> </data> </infobox> 74a612de14dbec4b249b2e0a8c4c9cae7a39b729 26 17 2024-05-10T17:59:26Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="capital"> <label>Capital</label> </data> <data source="largestcity"> <label>Largest city</label> </data> <data source="languages"> <label>Languages</label> </data> <data source="typegovernment"> <label>Type of government</label> </data> <data source="ruler"> <label>Current Ruler</label> </data> </infobox> a19e841e40e4ed9510dbb1e60b9916435ec7e335 37 26 2024-05-11T09:40:45Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="capital"> <label>Capital</label> </data> <data source="largestcity"> <label>Largest city</label> </data> <data source="languages"> <label>Languages</label> </data> <data source="government"> <label>Government</label> </data> <data source="ruler"> <label>Current Ruler</label> </data> </infobox> 5121a4d368e8df75049cb15d2196963675be5905 Mangalia 0 5 5 2024-05-10T14:44:10Z NoKiAthami 2 Created page with "{{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese|Mangalese]] ''Mangalelakuara'')is one of the nations on the Kaipan archipelago." wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese|Mangalese]] ''Mangalelakuara'')is one of the nations on the Kaipan archipelago. 8bb86506dc3d9f768af0be0c31dd1b14604266e4 6 5 2024-05-10T14:44:22Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese|Mangalese]] ''Mangalelakuara'') is one of the nations on the Kaipan archipelago. d9e1b8f334dc7d3a7bbf0a85c6791fdeba2758ba 7 6 2024-05-10T14:47:28Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. 92afe6659bc84f30999e691fe299b52d2f34a508 10 7 2024-05-10T15:13:38Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. c1e49b6cca75a4511fbb2f611965dde43181afcb 11 10 2024-05-10T15:52:22Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese_Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. 4a2ca17201bf57971e6047bf7f202ba2bfe09b73 12 11 2024-05-10T15:53:04Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Langage|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. f5352fbeb9c2666c623f01db1254c20ff755cfb9 13 12 2024-05-10T15:53:14Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. dc8573dde3939656ac50607ded189e03fb8d7f2d 15 13 2024-05-10T16:24:16Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. d451fbfc1087cf7adfb1bc2ca658cde51bd3a4a3 18 15 2024-05-10T16:37:16Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Monarchy absolute |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an empire, ruled by the 5cce0e61af0ffc63c6dcb60cd5d076d03ba9845e 19 18 2024-05-10T16:38:05Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Monarchy absolute |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an empire, ruled by the Emperor/Empress or ''Piukama''/''Piuqoakama'' d94d9777d902e8d6d172cddd68f383bcc13edc40 20 19 2024-05-10T16:43:06Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Monarchy absolute |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. 71fa3dcdb651fc79d00fe3acfe7432807b87c399 21 20 2024-05-10T16:45:26Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Absolute monarchy |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. 350fe52867f6b41870466a251de1fc5e311a13a8 31 21 2024-05-10T20:07:21Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Absolute monarchy |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == Divisions == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). [[File:Mangalia map.svg|thumb|Provinces (capital): 1-[[Aatsulaoparunga]] ([[Piapao]]), 2-[[Oloparunga]] ([[Chuqatsi]]), 3-[[Whurawhurani]] ([[Druiuna]]), 4-[[Tanilaparang]] ([[Uraxaalaparang]]), 5-[[Qulaku]] ([[Lakuaralaluma]]), 6-[[Suruniqu]] ([[Trotoni]]), 7-[[Olobuni]] ([[Whurama]]), 8-[[Puna]] ([[Maniaka]]), 9-[[Gahlani]] ([[Kharii]]), 10-[[Basharlakuara]] ([[Suna]]), 11-[[Mawiaikan]] ([[Talaria]]), 12-[[Saruna]] ([[Huuni]]), 13-[[Babasharhuplalakuara]] ([[Khanijana]]), 14-[[Babania]] ([[Sira]]), 15-[[Jalapo]] ([[Tsinaa]])]] f489fb5f19de72d390190121d3490695b57ce1fa 32 31 2024-05-11T08:55:32Z NoKiAthami 2 /* Divisions */ wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Absolute monarchy |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces (capital): 1-[[Aatsulaoparunga]] ([[Piapao]]), 2-[[Oloparunga]] ([[Chuqatsi]]), 3-[[Whurawhurani]] ([[Druiuna]]), 4-[[Tanilaparang]] ([[Uraxaalaparang]]), 5-[[Qulaku]] ([[Lakuaralaluma]]), 6-[[Suruniqu]] ([[Trotoni]]), 7-[[Olobuni]] ([[Whurama]]), 8-[[Puna]] ([[Maniaka]]), 9-[[Gahlani]] ([[Kharii]]), 10-[[Basharlakuara]] ([[Suna]]), 11-[[Mawiaikan]] ([[Talaria]]), 12-[[Saruna]] ([[Huuni]]), 13-[[Babasharhuplalakuara]] ([[Khanijana]]), 14-[[Babania]] ([[Sira]]), 15-[[Jalapo]] ([[Tsinaa]])]] a82742a8732afcfd032147b16eba6811172692dd 33 32 2024-05-11T08:56:30Z NoKiAthami 2 /* Name */ wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Absolute monarchy |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces (capital): 1-[[Aatsulaoparunga]] ([[Piapao]]), 2-[[Oloparunga]] ([[Chuqatsi]]), 3-[[Whurawhurani]] ([[Druiuna]]), 4-[[Tanilaparang]] ([[Uraxaalaparang]]), 5-[[Qulaku]] ([[Lakuaralaluma]]), 6-[[Suruniqu]] ([[Trotoni]]), 7-[[Olobuni]] ([[Whurama]]), 8-[[Puna]] ([[Maniaka]]), 9-[[Gahlani]] ([[Kharii]]), 10-[[Basharlakuara]] ([[Suna]]), 11-[[Mawiaikan]] ([[Talaria]]), 12-[[Saruna]] ([[Huuni]]), 13-[[Babasharhuplalakuara]] ([[Khanijana]]), 14-[[Babania]] ([[Sira]]), 15-[[Jalapo]] ([[Tsinaa]])]] 30918172ebdd46fb4ebeda7784b01d60e9889c86 34 33 2024-05-11T09:13:49Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Absolute monarchy |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The Pawa of Piapao, whose name was Pailamu, became the first Piukama, and all the other Pawas became the first Pakamas of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces (capital): 1-[[Aatsulaoparunga]] ([[Piapao]]), 2-[[Oloparunga]] ([[Chuqatsi]]), 3-[[Whurawhurani]] ([[Druiuna]]), 4-[[Tanilaparang]] ([[Uraxaalaparang]]), 5-[[Qulaku]] ([[Lakuaralaluma]]), 6-[[Suruniqu]] ([[Trotoni]]), 7-[[Olobuni]] ([[Whurama]]), 8-[[Puna]] ([[Maniaka]]), 9-[[Gahlani]] ([[Kharii]]), 10-[[Basharlakuara]] ([[Suna]]), 11-[[Mawiaikan]] ([[Talaria]]), 12-[[Saruna]] ([[Huuni]]), 13-[[Babasharhuplalakuara]] ([[Khanijana]]), 14-[[Babania]] ([[Sira]]), 15-[[Jalapo]] ([[Tsinaa]])]] 6ed4f61f283f9d9966fc0a1eb17cb3fa0f2e3153 35 34 2024-05-11T09:27:16Z NoKiAthami 2 /* Divisions - Administration */ wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Absolute monarchy |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The Pawa of Piapao, whose name was Pailamu, became the first Piukama, and all the other Pawas became the first Pakamas of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Northern region |- ! Provinces !! Capitals !! Blasons |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |} {| class="wikitable" |+ Central region |- ! Provinces !! Capitals !! Blasons |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |} {| class="wikitable" |+ Southern region |- ! Provinces !! Capitals !! Blasons |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} 6abbffd85027aabcf023cc917528bc952a4bab26 36 35 2024-05-11T09:30:53Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Uraxaalaparang|Uraxaalaparang]] |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |typegovernment = Absolute monarchy |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Northern region |- ! Provinces !! Capitals !! Blasons |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |} {| class="wikitable" |+ Central region |- ! Provinces !! Capitals !! Blasons |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |} {| class="wikitable" |+ Southern region |- ! Provinces !! Capitals !! Blasons |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} b75e5587ffd09ab163fef8858dbbaaa0aaf2976f 38 36 2024-05-11T09:40:57Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = Empire of Mangalia |nativename = ''Mangalelakuara'' ([[Mangalese Language|Mangalese]]) |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |languages = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |government = Absolute monarchy |ruler = Emperor Kauk (since 2016) }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Northern region |- ! Provinces !! Capitals !! Blasons |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |} {| class="wikitable" |+ Central region |- ! Provinces !! Capitals !! Blasons |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |} {| class="wikitable" |+ Southern region |- ! Provinces !! Capitals !! Blasons |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} b2e9a7f7c0bf052d8f2e91b9165a927e8eb54087 File:Mangalia map 2.svg 6 6 8 2024-05-10T15:09:15Z NoKiAthami 2 wikitext text/x-wiki A map of Mangalia 62b23b51aa84adb3e3e03a779d04ad441bbfd7ca Mangalese Language 0 7 14 2024-05-10T16:21:43Z NoKiAthami 2 Created page with "The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]." wikitext text/x-wiki The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 10e034da10d5e350d80770e06a55317f9e530821 40 14 2024-05-11T12:49:27Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |name = mangalese |nativename = ''Mangalemang'' |native = [[File:Mangalia_Flag.png|20px|frameless]] Mangalia |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |official = [[Mangalia]] (de facto) }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 15f20683d7a160a3f39bdd885abff5bed58ed13e 41 40 2024-05-11T12:55:22Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |native = [[File:Mangalia_Flag.png|20px|frameless]] Mangalia |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |official = [[Mangalia]] (de facto) |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. af462ae6a8b087fe3c93a2cb77750db2cca5da08 42 41 2024-05-11T13:03:04Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |official = [[Mangalia]] (de facto) |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 2c488f17e05c5cb88462ee32ad114f5a80aa6ade 43 42 2024-05-11T13:08:33Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |earlyforms = * [[Proto-Mangalic]] ** Eastern-Mangalic *** [[Ancient Mangalese]] |official = [[Mangalia]] (de facto) |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 3e69e3c4ce4c40ed0bbe24f5766b2ddd79ce1715 44 43 2024-05-11T13:09:06Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |earlyforms = * [[Proto-Mangalic]] ** Eastern-Mangalic *** [[Ancient Mangalese]] |official = [[Mangalia]] (de facto) |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 177e008115271ee84eaa0836a44a8eb2bbf18ecc 46 44 2024-05-11T13:16:23Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |image = [[File:Mangalemang.svg|thumb]] |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |earlyforms = * [[Proto-Mangalic]] ** Eastern-Mangalic *** [[Ancient Mangalese]] |official = [[Mangalia]] (de facto) |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 343bec6e9fbf619fef262665dd5316abc20f6003 Uraxaalaparang 0 8 22 2024-05-10T17:25:58Z NoKiAthami 2 Created page with "'''Uraxaalaparang''', formerly known as '''Whiaka''' is the political capital and religious capital of [[Mangalia]]. ==History== ===Reunion of the two Mangalias=== After centuries of scission, the [[Northern Mangalia|Northern]] and [[Southern Mangalia|Southern]] Mangalias reunited and decided a new Capital city for the empire. The main goal of choosing a new Capital instead of choosing one of the capitals of each former state, [[Piapao]] on Northern Mangalia, or Tsin..." wikitext text/x-wiki '''Uraxaalaparang''', formerly known as '''Whiaka''' is the political capital and religious capital of [[Mangalia]]. ==History== ===Reunion of the two Mangalias=== After centuries of scission, the [[Northern Mangalia|Northern]] and [[Southern Mangalia|Southern]] Mangalias reunited and decided a new Capital city for the empire. The main goal of choosing a new Capital instead of choosing one of the capitals of each former state, [[Piapao]] on Northern Mangalia, or [[Tsinaa]] on Southern Mangalia, is not to cause any other scission or war. If, for example, Piapao was chosen, it would be implied that Northern Mangalia was the "winner" and vice-versa. The chosen city was Whiaka, which was then given a new name: ''Uraxaalaparang'' - "the World's centre" or literally "the World's navel." 79855e1c28e618bdd1100e3769f74fd23482d3aa 23 22 2024-05-10T17:27:08Z NoKiAthami 2 wikitext text/x-wiki '''Uraxaalaparang''', formerly known as '''Whiaka''' is the political capital and religious capital of [[Mangalia]]. ==History== ===Reunion of the two Mangalias=== After centuries of scission, the [[Northern Mangalia|Northern]] and [[Southern Mangalia|Southern]] Mangalias reunited and decided a new Capital city for the empire. The main goal of choosing a new Capital instead of choosing one of the capitals of each former state, [[Piapao]] on Northern Mangalia, or [[Tsinaa]] on Southern Mangalia, is not to cause any other scission or war. If, for example, Piapao was chosen, it would be implied that Northern Mangalia was the "winner" and vice-versa. The chosen city was Whiaka and was then given a new name: ''Uraxaalaparang'' - "the World's centre" or literally "the World's navel". d48a868a7d1f6f7efefd7173d2c35359373a6153 27 23 2024-05-10T18:01:18Z NoKiAthami 2 wikitext text/x-wiki {{Infobox settlement |name = Uraxaalaparang |province = [[Tanilaparang]] |ruler = Emperor Kauk (since 2016) }} '''Uraxaalaparang''', formerly known as '''Whiaka''' is the political capital and religious capital of [[Mangalia]]. ==History== ===Reunion of the two Mangalias=== After centuries of scission, the [[Northern Mangalia|Northern]] and [[Southern Mangalia|Southern]] Mangalias reunited and decided a new Capital city for the empire. The main goal of choosing a new Capital instead of choosing one of the capitals of each former state, [[Piapao]] on Northern Mangalia, or [[Tsinaa]] on Southern Mangalia, is not to cause any other scission or war. If, for example, Piapao was chosen, it would be implied that Northern Mangalia was the "winner" and vice-versa. The chosen city was Whiaka and was then given a new name: ''Uraxaalaparang'' - "the World's centre" or literally "the World's navel". 09a7756ec3a9f615625c6e0b8b9cb0032be88e9e Template:Infobox settlement 10 9 24 2024-05-10T17:54:38Z NoKiAthami 2 Created page with "<infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="province"> <label>Province</label> </data> <data source="ruler"> <label>Actual Ruler</label> </data> </infobox>" wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="province"> <label>Province</label> </data> <data source="ruler"> <label>Actual Ruler</label> </data> </infobox> e9631db4264d366ba9b7224f326c76630acb2125 25 24 2024-05-10T17:59:19Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="province"> <label>Province</label> </data> <data source="ruler"> <label>Current Ruler</label> </data> </infobox> 965c99392902e929406516f8984d9243e3504457 Template:Infobox language 10 10 39 2024-05-11T12:38:07Z NoKiAthami 2 Created page with "<infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <data source="pronunciation"> <label>Pronunciation</label> </data> <data source="native"> <label>Native to</label> </data> <data source="ethnicity"> <label>Ethnicity</label> </data> <data source="natnumber"> <label>Native speakers</label> </data> <data sour..." wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <image source="image" /> <data source="imagesub"> </data> <data source="pronunciation"> <label>Pronunciation</label> </data> <data source="native"> <label>Native to</label> </data> <data source="ethnicity"> <label>Ethnicity</label> </data> <data source="natnumber"> <label>Native speakers</label> </data> <data source="family"> <label>Language family</label> </data> <data source="earlyforms"> <label>Early forms</label> </data> <data source="dialects"> <label>Dialects</label> </data> <data source="writing"> <label>Writing system</label> </data> <data source="signlang"> <label>Signed forms</label> </data> <data source="official"> <label>Official language in</label> </data> <data source="minority"> <label>Recognised minority language in</label> </data> <data source="regulated"> <label>Regulated by</label> </data> </infobox> cae6c889d7a41d001e2a64f558fae7f1bafa62a4 File:Mangalemang.svg 6 11 45 2024-05-11T13:15:12Z NoKiAthami 2 wikitext text/x-wiki Mangalese written in the native writing system. 852e2194e7eeb21b64bd8fc64829d797d1d1d4fa 47 45 2024-05-11T15:50:31Z NoKiAthami 2 NoKiAthami uploaded a new version of [[File:Mangalemang.svg]] wikitext text/x-wiki Mangalese written in the native writing system. 852e2194e7eeb21b64bd8fc64829d797d1d1d4fa Paleo-Kaipan Language 0 13 49 2024-05-11T16:24:52Z NoKiAthami 2 Created page with "{{Infobox language |nativename = ? |ethnicity = [[Paleo-Kaipan people]] |natnumber = 0 |family = unclassified }} The '''Paleo-Kaipan''' or '''Tsian language''' is an hypothetical language from a people before mangalic arrival on [[Mangalitia island]] or even other [[Kaipan archipelago|Kaipan people]] arrival on other lands. The basis of this hypothesis is some toponyms and hydronyms with names that don't seem to be from any other known mangalic language." wikitext text/x-wiki {{Infobox language |nativename = ? |ethnicity = [[Paleo-Kaipan people]] |natnumber = 0 |family = unclassified }} The '''Paleo-Kaipan''' or '''Tsian language''' is an hypothetical language from a people before mangalic arrival on [[Mangalitia island]] or even other [[Kaipan archipelago|Kaipan people]] arrival on other lands. The basis of this hypothesis is some toponyms and hydronyms with names that don't seem to be from any other known mangalic language. 1fae3d7c33ec44ceb26468c8d3fb5bde6d76fbf9 50 49 2024-05-11T16:59:08Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ? |ethnicity = [[Paleo-Kaipan people]] |natnumber = 0 |family = unclassified }} The '''Paleo-Kaipan''' or '''Tsian language''' is a hypothetical language from a people before mangalic arrival on [[Mangalitia island]] or even other [[Kaipan archipelago|Kaipan people]] arrival on other lands. The basis of this hypothesis is some toponyms and hydronyms with names that don't seem to be from any other known mangalic language. Many hydronyms are written ending <-i> or <-iy> or are written in two words: Hydronyms in [[Mangalia]]: * <Tsi> - <Tsi i> * <Gai> - <Ga i> * <Tsiki> - <Tsiki i> * <Sui> - <Su i> * <Maai> - <Maa i> * <Liei> - <Lie i> Hydronyms in [[Balopal]]: * <Bei iy> * <Xi iy> * <Ibi i> Some scholars speculate <i> could mean "river" or "waters" while the other part could be the name of the river. Reconstruct it as *i or *ʔi. It is speculated of having an initial glottal stop due to the orthography, especially in mangalese, of some river names. Some old texts have <Tsi i> written with two consecutive <i>s, as well as many other hydronyms ending with i (e.g. <Tsiki> - <Tsikii>). Mangalese doesn't have a glottal stop, so the mangalese writers could have separated the name of the river and *ʔi to indicate a pause between. 366b8aef83a623d7f46b8f58fb354218f842e11a 51 50 2024-05-11T17:04:48Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ? |ethnicity = [[Paleo-Kaipan people]] |natnumber = 0 |family = unclassified }} The '''Paleo-Kaipan''' or '''Tsian language''' is a hypothetical language from a people before mangalic arrival on [[Mangalitia island]] or even other [[Kaipan archipelago|Kaipan people]] arrival on other lands. The basis of this hypothesis is some toponyms and hydronyms with names that don't seem to be from any other known mangalic language. Many hydronyms are written ending ⟨-i⟩ or ⟨-iy⟩ or are written in two words: Hydronyms in [[Mangalia]]: * ⟨Tsi⟩ - ⟨Tsi i⟩ * ⟨Gai⟩ - ⟨Ga i⟩ * ⟨Tsiki⟩ - ⟨Tsiki i⟩ * ⟨Sui⟩ - ⟨Su i⟩ * ⟨Maai⟩ - ⟨Maa i⟩ * ⟨Liei⟩ - ⟨Lie i⟩ Hydronyms in [[Balopal]]: * ⟨Bei iy⟩ * ⟨Xi iy⟩ * ⟨Ibi i⟩ Some scholars speculate ⟨i⟩ could mean "river" or "waters" while the other part could be the name of the river. Reconstruct it as *i or *ʔi. It is speculated of having an initial glottal stop due to the orthography, especially in mangalese, of some river names. Some old texts have ⟨Tsi i⟩ written with two consecutive ⟨i⟩s, as well as many other hydronyms ending with i (e.g. ⟨Tsiki⟩ - ⟨Tsikii⟩). Mangalese doesn't have a glottal stop, so the mangalese writers could have separated the name of the river and *ʔi to indicate a pause between. 700da0c967c4b97d1ec3f7ccb107637cbc8a224e Mangalese Language 0 7 52 46 2024-05-11T20:34:07Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |image = [[File:Mangalemang.svg|thumb]] |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |earlyforms = * [[Proto-Mangalic]] ** Eastern-Mangalic *** [[Ancient Mangalese]] |signlang = [[Mangalese military sign language]] |official = [[Mangalia]] (de facto) |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 76b0381e4aa4b7255730fbd911dd2f679dab6df8 53 52 2024-05-11T20:50:31Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |image = [[File:Mangalemang.svg|thumb]] |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |earlyforms = * [[Proto-Mangalic]] ** Eastern-Mangalic *** [[Ancient Mangalese]] |dialects = * [[Mangalese northern dialects]] ** [[Piapao dialect]] * [[Mangalese central dialects]] ** [[Uraxaalaparang dialect]] * [[Mangalese southern dialects]] ** [[Jalapo dialects]] *** [[Tsinaa dialect]] * [[Insular polyphyletic dialects]] ** [[Mawiaikanian dialects]] |signlang = [[Mangalese military sign language]] |official = [[Mangalia]] (de facto) |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 7b9a5ebc0ff771116eaec72aba3388211a87ef48 54 53 2024-05-11T20:57:09Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |image = [[File:Mangalemang.svg|thumb]] |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic]] |earlyforms = * [[Proto-Mangalic]] ** Eastern-Mangalic *** [[Ancient Mangalese]] |dialects = * [[Mangalese northern dialects]] ** [[Piapao dialect]] * [[Mangalese central dialects]] ** [[Uraxaalaparang dialect]] * [[Mangalese southern dialects]] ** [[Jalapo dialects]] *** [[Tsinaa dialect]] * [[Insular polyphyletic dialects]] ** [[Mawiaikanian dialects]] |signlang = [[Mangalese military sign language]] |official = [[Mangalia]] (de facto) |minority = [https://en.wikipedia.org/wiki/New_Zealand New Zealand] |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 11a570c46787f5cd2e1e61c1ceb2eb98633a3f48 89 54 2024-05-11T22:58:55Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |image = [[File:Mangalemang.svg|thumb]] |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic Language Family|Mangalic]] |earlyforms = * [[Proto-Mangalic]] ** Eastern-Mangalic *** [[Ancient Mangalese]] |dialects = * [[Mangalese northern dialects]] ** [[Piapao dialect]] * [[Mangalese central dialects]] ** [[Uraxaalaparang dialect]] * [[Mangalese southern dialects]] ** [[Jalapo dialects]] *** [[Tsinaa dialect]] * [[Insular polyphyletic dialects]] ** [[Mawiaikanian dialects]] |signlang = [[Mangalese military sign language]] |official = [[Mangalia]] (de facto) |minority = [https://en.wikipedia.org/wiki/New_Zealand New Zealand] |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 31a1c7a98183417bf8abb76e3675be383c15c4fb Module:Documentation 828 14 55 2024-05-11T21:07:03Z NoKiAthami 2 Created page with "-- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in..." Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p d6c1bffca24be2d81fa882315ac613f5bb6b227c Module:Arguments 828 15 56 2024-05-11T21:08:15Z NoKiAthami 2 Created page with "-- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string'..." Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Documentation/config 828 16 57 2024-05-11T21:09:12Z NoKiAthami 2 Created page with "---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------..." Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 56b6127664e31128dea1cecf2e392cf9313df6a3 Template:Documentation 10 17 58 2024-05-11T21:09:29Z NoKiAthami 2 Created page with "{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}" wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}} cc4eb5999a198597c14b859d18d2aa7b190e3af0 Module:Infobox 828 18 59 2024-05-11T21:10:21Z NoKiAthami 2 Created page with "local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s'..." Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Template:Infobox 10 19 60 2024-05-11T21:10:39Z NoKiAthami 2 Created page with "{{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude>" wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Module:Endangered Languages Project 828 20 61 2024-05-11T21:12:02Z NoKiAthami 2 Created page with "local p = {} local elpf = "http://www.endangeredlanguages.com/lang/" -- or get P1630 local tidy_param = function(param) if param == "" then param = nil end return param end p.make_entry = function(frame) local out = {} local make_display = function(elpc, elpn) if elpc and elpn then table.insert(out, "[" .. elpf .. elpc .. " " .. elpn .. "]") elseif elpc or elpn then table.insert(out, (elpc or "") .. (elpn or "") .. "[[Category:Language articles with miss..." Scribunto text/plain local p = {} local elpf = "http://www.endangeredlanguages.com/lang/" -- or get P1630 local tidy_param = function(param) if param == "" then param = nil end return param end p.make_entry = function(frame) local out = {} local make_display = function(elpc, elpn) if elpc and elpn then table.insert(out, "[" .. elpf .. elpc .. " " .. elpn .. "]") elseif elpc or elpn then table.insert(out, (elpc or "") .. (elpn or "") .. "[[Category:Language articles with missing ELP parameters]]") end end local elpname = tidy_param(frame.args.elpname) local elpcode = tidy_param(frame.args.elpcode) local qid = tidy_param((frame.args.qid or ""):upper()) or mw.wikibase.getEntityIdForCurrentPage() make_display(elpcode, elpname) if qid then local props = mw.wikibase.getBestStatements(qid, "P2192") if props[1] then for _, v in ipairs(props) do local elpc = v.mainsnak.datavalue and v.mainsnak.datavalue.value local elpn = v.qualifiers and v.qualifiers.P1810 and v.qualifiers.P1810[1].datavalue and v.qualifiers.P1810[1].datavalue.value make_display(elpc, elpn) end end end local ret = "" if #out > 1 then return frame:expandTemplate{title = "ubl", args = out} elseif #out==1 then return out[1] end end return p ffc07145c67d0b7f8cf337e1c3066ad5c6b7f5de Template:Endangered Languages Project 10 21 62 2024-05-11T21:14:19Z NoKiAthami 2 Created page with "{{#invoke:Endangered Languages Project |make_entry |elpname={{{ELPname|}}} |elpcode={{{ELP|}}} |qid={{{qid|}}} }}<noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki {{#invoke:Endangered Languages Project |make_entry |elpname={{{ELPname|}}} |elpcode={{{ELP|}}} |qid={{{qid|}}} }}<noinclude> {{documentation}} </noinclude> 03ed06c2dccf6d2583988b7c0391a32dfe434ae5 Template:Template other 10 22 63 2024-05-11T21:20:43Z NoKiAthami 2 Created page with "{{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>" wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Template:Main other 10 23 64 2024-05-11T21:21:29Z NoKiAthami 2 Created page with "{{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude>" wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Template:Infobox language/family-color 10 24 65 2024-05-11T21:22:17Z NoKiAthami 2 Created page with "{{#switch:{{lc:{{{1|}}}}} | afro-asiatic | afrasiatic | afroasiatic = /**/#faecc8 | algic | algonkian = lightskyblue | altaic = yellowgreen | american | american (areal) = /**/#c0dde6 | andamanese = /**/#c99fee | australian | australian (areal) = /**/#eba9ee | austroasiatic | austro-asiatic = lightcoral | austronesian = pink | caucasian | caucasian (areal) = lightgreen | conlang | artificial | constructed | constructed language = /**/#114057 | creole | mixed | pidgin |..." wikitext text/x-wiki {{#switch:{{lc:{{{1|}}}}} | afro-asiatic | afrasiatic | afroasiatic = /**/#faecc8 | algic | algonkian = lightskyblue | altaic = yellowgreen | american | american (areal) = /**/#c0dde6 | andamanese = /**/#c99fee | australian | australian (areal) = /**/#eba9ee | austroasiatic | austro-asiatic = lightcoral | austronesian = pink | caucasian | caucasian (areal) = lightgreen | conlang | artificial | constructed | constructed language = /**/#114057 | creole | mixed | pidgin | creole/pidgin/mixed = tan | dravidian = mediumspringgreen | eskimo-aleut | eskimo–aleut | eskaleut = lightcyan | hmong-mien | miao-yao | hmong–mien | miao–yao = /**/#f2ceee | indo-european = /**/#c9ffd9 | isolate | language isolate | gray | grey | #dddddd = /**/#dddddd | khoisan | khoisan (areal) = goldenrod | na-dene | na-dené | dene-yeniseian | dené-yeniseian | na–dene | na–dené | dene–yeniseian | dené–yeniseian = /**/#99ddff | niger-congo | niger–congo = /**/#ffddaa | nilo-saharan | nilo-saharan? = gold | palaeosiberian | palaeo-siberian | paleosiberian | paleo-siberian | palaeosiberian (areal) = darkseagreen | papuan | papuan (areal) = /**/#fd79da | sign | sign language = silver | sino-tibetan = salmon | kra-dai | kadai | kradai | tai-kadai | kra–dai | tai–kadai = lavender | uralic = lime | uto-aztecan | utoaztecan = /**/#80bfff | unclassified | superfamily = white | #default =<!--blank--> }}<noinclude> {{documentation}} </noinclude> 750756720dd769f4b7108e5631f1b6b23395e829 Template:Infobox language/genetic 10 25 66 2024-05-11T21:23:08Z NoKiAthami 2 Created page with "{{#switch:{{lc:{{{1|}}}}} | afro-asiatic | afroasiatic = [[Afroasiatic languages|Afro-Asiatic]] | niger-congo | niger–congo = [[Niger–Congo languages|Niger–Congo]]? | nilo-saharan = [[Nilo-Saharan languages|Nilo-Saharan]]? | khoisan = (specify language family under 'fam1')[[Category:Language articles with spurious family]] | indo-european = [[Indo-European languages|Indo-European]] | caucasian = (specify language family under 'fam1')Category:Language articles wit..." wikitext text/x-wiki {{#switch:{{lc:{{{1|}}}}} | afro-asiatic | afroasiatic = [[Afroasiatic languages|Afro-Asiatic]] | niger-congo | niger–congo = [[Niger–Congo languages|Niger–Congo]]? | nilo-saharan = [[Nilo-Saharan languages|Nilo-Saharan]]? | khoisan = (specify language family under 'fam1')[[Category:Language articles with spurious family]] | indo-european = [[Indo-European languages|Indo-European]] | caucasian = (specify language family under 'fam1')[[Category:Language articles with spurious family]] | altaic = [[Altaic languages|Altaic]]? | uralic = [[Uralic languages|Uralic]] | dravidian = [[Dravidian languages|Dravidian]] | paleosiberian | paleo-siberian | palaeosiberian | palaeo-siberian = (specify language family under 'fam1')[[Category:Language articles with spurious family]] | austronesian = [[Austronesian languages|Austronesian]] | austro-asiatic | austroasiatic = [[Austroasiatic languages|Austroasiatic]] | sino-tibetan = [[Sino-Tibetan languages|Sino-Tibetan]] | hmong-mien | hmong–mien = [[Hmong–Mien languages|Hmong–Mien]] | andamanese = (specify language family under 'fam1' or 'family')[[Category:Language articles with spurious family]] | australian = (specify language family under 'fam1' or 'family')[[Category:Language articles with spurious family]] | papuan = (specify language family under 'fam1')[[Category:Language articles with spurious family]] | tai-kadai | tai–kadai | kadai | kradai | kra-dai | kra–dai = [[Kra–Dai languages|Kra–Dai]] | american = (specify language family under 'fam1' or 'family')[[Category:Language articles with spurious family]] | na-dene | na-dené | dene-yeniseian | dené-yeniseian | dene–yeniseian | dené–yeniseian = [[Dené–Yeniseian languages|Dené–Yeniseian]]? | eskimo-aleut | eskimo–aleut = [[Eskaleut languages|Eskaleut]] | uto-aztecan = [[Uto-Aztecan languages|Uto-Aztecan]] | creole = [[Creole language|Creole]] | pidgin = [[Pidgin]] | mixed = [[Mixed language|Mixed]] | isolate | language isolate = [[language isolate]] | sign | sign language = [[sign language]] | conlang | constructed language = [[constructed language]] | unclassified = [[Unclassified language|unclassified]] | = {{main other|[[Category:Languages without family color codes]]}} | #default = {{{1}}}{{main other|[[Category:Languages without family color codes]]}} }}<noinclude> {{documentation}} </noinclude> 17e2604cda30a62131143effc2d6da6c0e55a862 Template:Infobox language family 10 26 67 2024-05-11T21:27:46Z NoKiAthami 2 Created page with "{{Infobox | bodystyle = width:{{#if:{{{boxsize|}}}|{{{boxsize}}}|22em}}; | abovestyle = background-color: {{Infobox language/family-color|{{{familycolor|Default}}}}}; | subheaderstyle = background-color: {{Infobox language/family-color|{{{familycolor|Default}}}}}; | above = {{{name}}} | subheader = {{{altname|}}} | subheader2 = {{#if:{{{acceptance|}}}|({{{acceptance|}}})}} | label1 = Ethnicity | data1 = {{{ethnicity|}}} | label2 = Geographic<br>distribution | data2 =..." wikitext text/x-wiki {{Infobox | bodystyle = width:{{#if:{{{boxsize|}}}|{{{boxsize}}}|22em}}; | abovestyle = background-color: {{Infobox language/family-color|{{{familycolor|Default}}}}}; | subheaderstyle = background-color: {{Infobox language/family-color|{{{familycolor|Default}}}}}; | above = {{{name}}} | subheader = {{{altname|}}} | subheader2 = {{#if:{{{acceptance|}}}|({{{acceptance|}}})}} | label1 = Ethnicity | data1 = {{{ethnicity|}}} | label2 = Geographic<br>distribution | data2 = {{{region|—}}} | label3 = {{#if:{{{extinct|}}} |[[Extinct language|Extinct]] |{{#if:{{{era|}}} |Era |{{#if:{{{creator|{{{speakers_label|}}}}}} |{{{speakers_label|Users}}} |{{longitem|Native speakers}} }} }} }} | data3 =<!-- -->{{#if:{{{extinct|}}}|{{#ifeq:{{{extinct}}}|?|(date missing)[[Category:Language articles with unknown extinction date]]|{{{extinct}}}}}<!-- extinct input used -->|{{#if:{{{era|}}}|{{{era}}}<!-- era input used -->|<!-- no era, check for sign/spoken -->{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}} }}|silver<!-- check for silver -->|<!-- SIGN language (silver) -->{{#if:{{{speakers|}}}|{{#ifeq: {{lc:{{{date}}}}}|na|{{{speakers|–}}} |{{#ifeq:{{{speakers}}}|?|<!-- -->|{{#ifeq:{{{speakers}}}|none|''None'' |{{#if:{{{date|}}}|{{{speakers|–}}}&nbsp;({{{dateprefix|}}}{{{date}}}) |{{{speakers|–}}}{{main other|[[Category:Language articles with speaker number undated]]}}}} }} }} }} }}<!--(end if:date, ifeq:date=na, if:speakers. end of SIGN) -->|<!-- SPOKEN language (not silver) -->{{#if:{{{speakers|}}}|{{#ifeq: {{lc:{{{date}}}}}|na|{{{speakers|–}}} |{{#ifeq: {{{date}}}|no date|(undated figure of {{{speakers}}})|<!-- The following changes the display depending on the age of the data. Limit set to 25 years, as a population can double in that time. -->{{#if:{{{date|}}}|{{#iferror:{{#expr: {{padleft:|4|{{{date}}}|}} }}||{{#ifexpr:(({{CURRENTYEAR}} - {{padleft:|4|{{{date}}}|}}) < 25)<!-- -->|<!-- regular-->{{{speakers|–}}}&nbsp;({{{dateprefix|}}}{{{date}}})<!-- -->|<!-- old (25+) -->({{{speakers}}} cited {{{dateprefix|}}}{{{date}}}){{main other|{{#ifeq:{{{ref}}}|e19|[[Category:Language articles with old Ethnologue 19 speaker data]]|{{#ifeq:{{{ref}}}|e18|[[Category:Language articles with old Ethnologue 18 speaker data]]|[[Category:Language articles with old speaker data]]}}}}}}}}}}<!--(end ifexpr:25+, iferror:) -->|{{#ifeq:{{{speakers}}}|?|<!-- -->|{{#ifeq:{{{speakers}}}|none|''None'' |<!-- no date input -->{{{speakers|–}}}{{main other|[[Category:Language articles with speaker number undated]]}}}} }} }}<!--(end if:date, before the 25+ expr check) -->}}<!--(end ifeq:date=no date) -->}}<!--(end ifeq:date=na) -->|<!--(no speakers number to be shown)-->}}}}<!--(end if:speakers (in 2nd param of silver-check), if:silver. end of SPOKEN) -->}} }}<!--(end if:era, if:extinct. No open #if:s left) If there is a ref, and there is any input for this row (data3), then we add the reference: -->{{#if:{{{ref|}}}|{{#if:{{{extinct|}}}{{{era|}}}{{{speakers|}}}{{{date|}}}{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|silver|sign_language}}|{{Infobox language/ref|{{{ref}}}|iso3={{{iso3|}}}|refname={{{refname|}}}|name={{{name|{{PAGENAME}}}}}|lc1={{{lc1|}}}|ld1={{Delink|{{{ld1}}}}}|lc2={{{lc2|}}}|ld2={{Delink|{{{ld2}}}}}|lc3={{{lc3|}}}|ld3={{Delink|{{{ld3}}}}}|lc4={{{lc4|}}}|ld4={{Delink|{{{ld4}}}}}|lc5={{{lc5|}}}|ld5={{Delink|{{{ld5}}}}}|lc6={{{lc6|}}}|ld6={{Delink|{{{ld6}}}}}|lc7={{{lc7|}}}|ld7={{Delink|{{{ld7}}}}}}}}}}}<!-- Add speakers2 after the ref: -->{{#if:{{{speakers2|}}}|<br />{{{speakers2|}}} }} | label4 = [[Language family|Linguistic classification]] | data4 = {{{family|{{{fam1|{{Infobox language/genetic|{{{familycolor|Default}}}}}}}}<ul style="line-height:100%; margin-left:15px;padding-left:0"><li>{{#if:{{{fam2|}}} | {{{fam2}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam3|}}} | {{{fam3}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam4|}}} | {{{fam4}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam5|}}} | {{{fam5}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam6|}}} | {{{fam6}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam7|}}} | {{{fam7}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam8|}}} | {{{fam8}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam9|}}} | {{{fam9}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam10|}}} | {{{fam10}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam11|}}} | {{{fam11}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam12|}}} | {{{fam12}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam13|}}} | {{{fam13}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam14|}}} | {{{fam14}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>{{#if:{{{fam15|}}} | {{{fam15}}}<ul style="line-height:100%; margin-left:5px;padding-left:0"><li>'''{{{name}}}'''</li></ul> | '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul>| '''{{{name}}}''' }}</li></ul> }}} | label5 = {{longitem|{{#if:{{{ancestor2|}}}|Early forms|Early form}}}} | data5 = {{#if:{{{ancestor|}}}|<div style="text-align:left;">{{{ancestor|}}} {{#if:{{{ancestor2|}}}|<ul style="line-height:100%; margin-left:1.35em; padding-left:0"><li>{{{ancestor2}}} {{#if:{{{ancestor3|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor3}}} {{#if:{{{ancestor4|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor4}}} {{#if:{{{ancestor5|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor5}}} {{#if:{{{ancestor6|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor6}}} {{#if:{{{ancestor7|}}}|<ul style="line-height:100%; margin-left:0.45em; padding-left:0"><li>{{{ancestor7}}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </li></ul>}} </div>}} | label6 = Proto-language | data6 = {{{protoname|}}} | label7 = Subdivisions | data7 = {{#if:{{{children|}}}|{{{children}}}}} {{#if:{{{child1|}}}|*{{{child1}}}}} {{#if:{{{child2|}}}|*{{{child2}}}}} {{#if:{{{child3|}}}|*{{{child3}}}}} {{#if:{{{child4|}}}|*{{{child4}}}}} {{#if:{{{child5|}}}|*{{{child5}}}}} {{#if:{{{child6|}}}|*{{{child6}}}}} {{#if:{{{child7|}}}|*{{{child7}}}}} {{#if:{{{child8|}}}|*{{{child8}}}}} {{#if:{{{child9|}}}|*{{{child9}}}}} {{#if:{{{child10|}}}|*{{{child10}}}}} {{#if:{{{child11|}}}|*{{{child11}}}}} {{#if:{{{child12|}}}|*{{{child12}}}}} {{#if:{{{child13|}}}|*{{{child13}}}}} {{#if:{{{child14|}}}|*{{{child14}}}}} {{#if:{{{child15|}}}|*{{{child15}}}}} {{#if:{{{child16|}}}|*{{{child16}}}}} {{#if:{{{child17|}}}|*{{{child17}}}}} {{#if:{{{child18|}}}|*{{{child18}}}}} {{#if:{{{child19|}}}|*{{{child19}}}}} {{#if:{{{child20|}}}|*{{{child20}}}}} | rowclass7 = {{{listclass|plainlist}}} | label10 = {{#if:{{{iso1|}}} | [[ISO 639-1]] }} | data10 = {{#if:{{{iso1|}}} |<samp>{{{iso1}}}</samp> }} | label11 = {{#if:{{{iso2|}}} | [[ISO 639-2]] / [[ISO 639-5|5]] |{{#if:{{{iso5|}}} |[[ISO 639-5]] }} }} | data11 = {{#if:{{{iso2|}}} |<samp>[[ISO639-3:{{{iso2}}}|{{{iso2}}}]]</samp> |{{#if:{{{iso5|}}} |<samp>[[ISO639-3:{{{iso5}}}|{{{iso5}}}]]</samp> }} }} | label12 = {{#if:{{{iso3|}}} | [[ISO 639-3]] }} | data12 = {{#if:{{{iso3|}}} |<samp>[https://iso639-3.sil.org/code/{{{iso3}}} {{{iso3}}}]</samp> }} | label13 = {{#if:{{{iso6|}}}<!--obsolete--> | [[ISO 639-6]] }} | data13 = {{#if:{{{iso6|}}} |<samp>{{{iso6}}}</samp> }} | label14 = [[Linguasphere Observatory|Linguasphere]] | data14 = {{#if:{{{lingua|}}} |<samp>{{{lingua}}}</samp> }} | label15 = [[Glottolog]] | data15 = {{#if:{{{glotto|}}}|{{#ifeq:{{lc:{{{glotto|}}}}}|none|''None''{{main other|[[Category:Families rejected by Glottolog]]}}|{{#ifeq:{{lc:{{{glotto|}}}}}|na|(not evaluated){{main other|[[Category:Families not evaluated by Glottolog]]}} |<samp>{{glottolink|{{{glotto}}}}}</samp>{{#if:{{{glottoname|}}}|&nbsp; {{nowrap|({{{glottoname}}})}}}}}}}}}}<!-- -->{{#if:{{{glotto2|}}}|{{#if:{{{glotto|}}}|<br>|<!--no break when more than one info box on a page-->}}<samp>{{glottolink|{{{glotto2}}}}}</samp>{{#if:{{{glottoname2|}}}|&nbsp; {{nowrap|({{{glottoname2}}})}}}}}}<!-- -->{{#if:{{{glotto3|}}}|{{#if:{{{glotto2|}}}|<br>|<!--no break-->}}<samp>{{glottolink|{{{glotto3}}}}}</samp>{{#if:{{{glottoname3|}}}|&nbsp; {{nowrap|({{{glottoname3}}})}}}}}}<!-- -->{{#if:{{{glotto4|}}}|{{#if:{{{glotto3|}}}|<br>|<!--no break-->}}<samp>{{glottolink|{{{glotto4}}}}}</samp>{{#if:{{{glottoname4|}}}|&nbsp; {{nowrap|({{{glottoname4}}})}}}}}}<!-- -->{{#if:{{{glotto5|}}}|{{#if:{{{glotto4|}}}|<br>|<!--no break-->}}<samp>{{glottolink|{{{glotto5}}}}}</samp>{{#if:{{{glottoname5|}}}|&nbsp; {{nowrap|({{{glottoname5}}})}}}}}} | label16 = [[Endangered Languages Project|ELP]] | data16 = {{Endangered Languages Project |ELP={{{ELP|}}} |ELPname={{{ELPname|}}} |qid={{{qid|}}} }} | data20 = {{#if:{{{map|}}} | {{#invoke:InfoboxImage|InfoboxImage|image={{{map}}}|size={{{mapsize|}}}|sizedefault=300px|alt={{{mapalt|}}}}}{{#if:{{{mapcaption|}}} |<div style="text-align:left;">{{{mapcaption}}}</div> }} }} | data21 = {{#if:{{{map2|}}} | [[File:{{{map2}}}|{{#if:{{{mapsize|}}}|{{{mapsize}}}px|300px}}|alt={{{mapalt2|}}}]]{{#if:{{{mapcaption2|}}} |<br><div style="text-align:left;">{{{mapcaption2}}}</div> }} }} | data22 = {{{module|}}} | label23 = Notes | data23 = {{{notes|}}} }}<!-- -->{{main other|{{{{{|safesubst:}}}#invoke:Check for unknown parameters|check|unknown=[[Category:Language articles with unsupported infobox fields|_VALUE_]] |preview=Page using [[Template:Infobox language family]] with unknown parameter "_VALUE_" |name|altname |region|ethnicity|acceptance |speakers|date|ref |familycolor|fam1|fam2|fam3|fam4|fam5|fam6|fam7|fam8|fam9 |fam10|fam11|fam12|fam13|fam14|fam15|family |ancestor|ancestor2|ancestor3|ancestor4|ancestor5|ancestor6|ancestor7|protoname|extinct |children|child1|child2|child3|child4|child5|child6|child7|child8|child9|child10 |child11|child12|child13|child14|child15|child16|child17|child18|child19|child20 |listclass|module|notes |iso1|iso2|iso3|iso5|iso6 |lingua|glotto|glottoname|glotto2|glottoname2|glotto3|glottoname3|glotto4|glottoname4|glotto5|glottoname5|glottorefname|glottorefname2|glottorefname3|glottorefname4|glottorefname5 |ELP|ELPname |map|mapsize|mapalt|mapcaption|map2|mapalt2|mapcaption2|boxsize }}<!-- -->{{#ifeq:{{Infobox language/family-color|{{{familycolor|}}}}}|<!--blank-->|[[Category:Languages without family color codes]]}}<!-- -->{{#if:{{{glotto|}}}{{{glotto2|}}}{{{glotto3|}}}{{{glotto4|}}}{{{glotto5|}}}|<!--ok-->|[[Category:Families missing Glottolog code]]}}<!-- -->{{#if:{{{glotto|}}}|{{#if:{{{glottorefname|}}}{{{glottoname|}}}|<!--ok-->|{{#ifeq:{{lc:{{{glotto|}}}}}|none|<!--ok-->|{{#ifeq:{{lc:{{{glotto|}}}}}|na|<!--ok-->|[[Category:Articles with unnamed Glottolog code]]}}}}}}}}<!-- -->{{#if:{{{glotto2|}}}|{{#if:{{{glottoname2|}}}{{{glottorefname2|}}}|<!--ok-->|[[Category:Articles with unnamed Glottolog code]]}}}}<!-- -->{{#if:{{{glotto3|}}}|{{#if:{{{glottoname3|}}}{{{glottorefname3|}}}|<!--ok-->|[[Category:Articles with unnamed Glottolog code]]}}}}<!-- -->{{#if:{{{glotto4|}}}|{{#if:{{{glottoname4|}}}{{{glottorefname4|}}}|<!--ok-->|[[Category:Articles with unnamed Glottolog code]]}}}}<!-- -->{{#if:{{{glotto5|}}}|{{#if:{{{glottoname5|}}}{{{glottorefname5|}}}|<!--ok-->|[[Category:Articles with unnamed Glottolog code]]}}}}<!-- -->}}<noinclude> 6286366b0542a443194622b22a322b8bd3af7a2e Module:Yesno 828 27 68 2024-05-11T21:29:49Z NoKiAthami 2 Created page with "-- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val =..." Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:File link 828 28 69 2024-05-11T21:35:11Z NoKiAthami 2 Created page with "-- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in..." Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Template:Tree list 10 29 70 2024-05-11T21:41:19Z NoKiAthami 2 Created page with "<templatestyles src="Tree list/styles.css" /><!-- --><div class="treeview"><noinclude> </div> {{Documentation}} </noinclude>" wikitext text/x-wiki <templatestyles src="Tree list/styles.css" /><!-- --><div class="treeview"><noinclude> </div> {{Documentation}} </noinclude> 3c3df2fc2f0185fa60fd2fdde34e5b13181ff42f Template:Tree list/end 10 30 71 2024-05-11T21:43:35Z NoKiAthami 2 Created page with "<includeonly></div></includeonly><noinclude> {{Documentation|Template:Tree list/doc}} </noinclude>" wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{Documentation|Template:Tree list/doc}} </noinclude> cdcda060fe4563745fb7a50f1c335c9abe5e2b08 Template:Pp-template 10 31 72 2024-05-11T21:53:04Z NoKiAthami 2 Created page with "<includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 31be6fc5b968e0deb5100a35b856393cdeb35b90 Module:Protection banner 828 32 73 2024-05-11T21:53:55Z NoKiAthami 2 Created page with "-- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and..." Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Effective protection level 828 33 74 2024-05-11T21:54:49Z NoKiAthami 2 Created page with "local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local leve..." Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts if title.namespace == 0 then return 'autoconfirmed' -- Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace end return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p b6cb1e5589ec6575118f60841644cd65defa7174 Module:Effective protection expiry 828 34 75 2024-05-11T21:55:28Z NoKiAthami 2 Created page with "local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'auto..." Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Module:Protection banner/config 828 35 76 2024-05-11T21:56:11Z NoKiAthami 2 Created page with "-- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appear..." Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|move'] = 'Wikipedia template-protected pages other than templates and modules', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } 65de905227752d0a0dae145e9ad8dbe1d0087016 Template:Tree list/style.css 10 36 77 2024-05-11T22:00:34Z NoKiAthami 2 Created page with "/* {{pp-template}} */ .treeview ul { padding: 0; margin: 0; } .treeview li { padding: 0; margin: 0; list-style-type: none; list-style-image: none; } .treeview li li { background: url("https://upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png") no-repeat 0 -2981px; /* @noflip */ padding-left: 21px; text-indent: 0.3em; } .treeview li li:last-child { background-position: 0 -5971px } /* first line here deals with new situation after RemexHTML..." wikitext text/x-wiki /* {{pp-template}} */ .treeview ul { padding: 0; margin: 0; } .treeview li { padding: 0; margin: 0; list-style-type: none; list-style-image: none; } .treeview li li { background: url("https://upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png") no-repeat 0 -2981px; /* @noflip */ padding-left: 21px; text-indent: 0.3em; } .treeview li li:last-child { background-position: 0 -5971px } /* first line here deals with new situation after RemexHTML switch, * where emptyline cause the first child to become the 2nd child. Such a mess */ .treeview li.emptyline > ul > .mw-empty-elt:first-child + .emptyline, .treeview li.emptyline > ul > li:first-child { background-position: 0 9px } a033cdb57b07f78781a6c065fa37884bfe489045 Module:Side box 828 37 78 2024-05-11T22:09:50Z NoKiAthami 2 Created page with "local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args...." Scribunto text/plain local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args.collapsible == "collapsed" then table.insert(data.classes, 'mw-collapsed') end data.collapsible = true end table.insert(data.classes, args.class) -- Image if args.image and args.image ~= 'none' then data.image = args.image end -- we have to check to see if a downstream use has plainlist like -- Template:Sister_project. also it's the default. wikitext is :( if args.textclass == 'plainlist' or not args.textclass then data.textclass = 'plainlist' data.plainlist_templatestyles = 'Plainlist/styles.css' else data.textclass = args.textclass end -- Copy over data that does not need adjusting local argsToCopy = { -- aria qualities 'role', 'labelledby', -- Styles 'style', 'textstyle', 'templatestyles', -- Above row 'above', 'abovestyle', -- Body row 'text', 'imageright', -- Below row 'below', } for i, key in ipairs(argsToCopy) do data[key] = args[key] end return data end local function renderSidebox(data) -- Renders the sidebox HTML. -- Table root local root = mw.html.create('div') root:attr('role', data.role) :attr('aria-labelledby', data.labelledby) :addClass('side-box') for i, class in ipairs(data.classes or {}) do root:addClass(class) end if data.style then root:cssText(data.style) end local frame = mw.getCurrentFrame() if data.plainlist_templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = data.plainlist_templatestyles } }) end -- The "above" row if data.above then local above = root:newline():tag('div') above:addClass('side-box-abovebelow') :newline() :wikitext(data.above) if data.textstyle then above:cssText(data.textstyle) end if data.abovestyle then above:cssText(data.abovestyle) end end -- The body row local body = root:newline():tag('div') body:addClass('side-box-flex') :addClass(data.collapsible and 'mw-collapsible-content') :newline() if data.image then body:tag('div') :addClass('side-box-image') :wikitext(data.image) end local text = body:newline():tag('div') text:addClass('side-box-text') :addClass(data.textclass) if data.textstyle then text:cssText(data.textstyle) end text:wikitext(data.text) if data.imageright then body:newline():tag('div') :addClass('side-box-imageright') :wikitext(data.imageright) end -- The below row if data.below then local below = root:newline():tag('div') below :addClass('side-box-abovebelow') :wikitext(data.below) if data.textstyle then below:cssText(data.textstyle) end end root:newline() local templatestyles = '' if data.templatestyles then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = data.templatestyles } } end return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Side box/styles.css' } } .. templatestyles .. tostring(root) end function p._main(args) local data = makeData(args) return renderSidebox(data) end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 096bef4a3721857fc16eb509a4f8d75973484485 Template:Infobox country 10 4 82 37 2024-05-11T22:25:29Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <data source="dates"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="motto"> <label>Motto</label> </data> <data source="anthem"> <label>Anthem</label> </data> <image source="image3" /> <data source="imagesub3"> </data> <data source="capital"> <label>Capital</label> </data> <data source="largestcity"> <label>Largest city</label> </data> <data source="offlangs"> <label>Official languages</label> </data> <data source="reglangs"> <label>Recognized regional languages</label> </data> <data source="comlangs"> <label>Other common languages</label> </data> <data source="religion"> <label>Religion</label> </data> <data source="demonyms"> <label>Demonyms</label> </data> <data source="government"> <label>Government</label> </data> <data source="firstking"> <label>First king</label> </data> <data source="lastking"> <label>Last king</label> </data> <data source="legislature"> <label>Legislature</label> </data> <data source="population"> <label>Population</label> </data> <data source="currency"> <label>Currency</label> </data> <data source="preceded"> <label>Preceded by</label> </data> <data source="suceeded"> <label>Suceeded by</label> </data> </infobox> 7b6247ec8be2589785cd6fa70f670e381143fecc Mangalia 0 5 83 38 2024-05-11T22:34:11Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Northern region |- ! Provinces !! Capitals !! Blasons |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |} {| class="wikitable" |+ Central region |- ! Provinces !! Capitals !! Blasons |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |} {| class="wikitable" |+ Southern region |- ! Provinces !! Capitals !! Blasons |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} 9cd01937484510c4c2cf097be586236f6c09d15c Template:Tree list/branching 10 41 84 2024-05-11T22:37:16Z NoKiAthami 2 Created page with "<includeonly><li class="emptyline"></includeonly><noinclude> {{Documentation|Template:Tree list/doc}} </noinclude>" wikitext text/x-wiki <includeonly><li class="emptyline"></includeonly><noinclude> {{Documentation|Template:Tree list/doc}} </noinclude> 530e32b7119fdb2a9fcb93fdecf211a365e6541f Template:Tree list/styles.css 10 42 85 2024-05-11T22:47:11Z NoKiAthami 2 Created page with "/* {{pp-template}} */ .treeview ul { padding: 0; margin: 0; } .treeview li { padding: 0; margin: 0; list-style-type: none; list-style-image: none; } .treeview li li { background: url("https://upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png") no-repeat 0 -2981px; /* @noflip */ padding-left: 21px; text-indent: 0.3em; } .treeview li li:last-child { background-position: 0 -5971px } /* first line here deals with new situation after RemexHTML..." sanitized-css text/css /* {{pp-template}} */ .treeview ul { padding: 0; margin: 0; } .treeview li { padding: 0; margin: 0; list-style-type: none; list-style-image: none; } .treeview li li { background: url("https://upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png") no-repeat 0 -2981px; /* @noflip */ padding-left: 21px; text-indent: 0.3em; } .treeview li li:last-child { background-position: 0 -5971px } /* first line here deals with new situation after RemexHTML switch, * where emptyline cause the first child to become the 2nd child. Such a mess */ .treeview li.emptyline > ul > .mw-empty-elt:first-child + .emptyline, .treeview li.emptyline > ul > li:first-child { background-position: 0 9px } a033cdb57b07f78781a6c065fa37884bfe489045 Template:Pp 10 43 86 2024-05-11T22:50:25Z NoKiAthami 2 Created page with "{{#invoke:Protection banner|main}}<noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki {{#invoke:Protection banner|main}}<noinclude> {{documentation}} </noinclude> 4b195ffc44cfde864ef77b55a54c006333226ced Module:Documentation/styles.css 828 44 87 2024-05-11T22:52:25Z NoKiAthami 2 Created page with "/* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bott..." sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } html.skin-theme-clientpref-night .documentation, html.skin-theme-clientpref-night .documentation-metadata { background-color: inherit; } @media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .documentation, html.skin-theme-clientpref-os .documentation-metadata { background-color: inherit; } } a086e12b14e61c1254b77cddf71625c15359e806 Piukama 0 45 88 2024-05-11T22:58:00Z NoKiAthami 2 Created page with "The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == {{Tree list}} * Khi (2045-2022 BCE) ** Muntsa (2022-2020 BCE) ** Hup (2020-1989 BCE) *** Pailamu (1989-1962 BCE) **** Shukhi **** Hup II **** Amia {{Tree list/end}}" wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == {{Tree list}} * Khi (2045-2022 BCE) ** Muntsa (2022-2020 BCE) ** Hup (2020-1989 BCE) *** Pailamu (1989-1962 BCE) **** Shukhi **** Hup II **** Amia {{Tree list/end}} 522d3c2ae28c53ac5e1e17ee859a26f8a0bcd93f Template:Hidden begin 10 46 90 2024-05-11T23:07:48Z NoKiAthami 2 Created page with "<includeonly><templatestyles src="Template:Hidden begin/styles.css"/><div class="hidden-begin mw-collapsible {{#ifeq:{{{showhide|{{{toggle}}}}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}}||mw-collapsed}} {{{class|}}}" style="{{#if:{{{width|}}}|width:{{{width}}};}} {{#if:{{{border|}}}|border:{{{border}}};}} {{#if:{{{bgcolor|}}}|background-color:{{{bgcolor}}};}} {{{style|}}}"><!-- --><div class="hidden-title skin-nightmode-reset-color" style="{{#if:{{{ta1|..." wikitext text/x-wiki <includeonly><templatestyles src="Template:Hidden begin/styles.css"/><div class="hidden-begin mw-collapsible {{#ifeq:{{{showhide|{{{toggle}}}}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}}||mw-collapsed}} {{{class|}}}" style="{{#if:{{{width|}}}|width:{{{width}}};}} {{#if:{{{border|}}}|border:{{{border}}};}} {{#if:{{{bgcolor|}}}|background-color:{{{bgcolor}}};}} {{{style|}}}"><!-- --><div class="hidden-title skin-nightmode-reset-color" style="{{#if:{{{ta1|}}}|text-align:{{{ta1}}};}} {{#if:{{{titlebgcolor|}}}|background-color:{{{titlebgcolor}}};}} {{{titlestyle|}}}">{{{title|{{{header|}}}}}}</div><!-- --><div class="hidden-content mw-collapsible-content" style="{{#if:{{{ta2|}}}|text-align:{{{ta2}}};}} {{#if:{{{contentbgcolor|}}}|background-color:{{{contentbgcolor}}};}} {{{contentstyle|{{{bodystyle|}}}}}}"><!-- Content added after the template --></includeonly><noinclude> {{Documentation}} </noinclude> 827e7bbb20cf10d19ad4c3798326207c85de69f8 Template:Hidden end 10 47 91 2024-05-11T23:08:25Z NoKiAthami 2 Created page with "<includeonly></div></div></includeonly><noinclude> {{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}} {{Documentation|Template:Hidden begin/doc}} </noinclude>" wikitext text/x-wiki <includeonly></div></div></includeonly><noinclude> {{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}} {{Documentation|Template:Hidden begin/doc}} </noinclude> 6cc7eb4776ef10092d5f7d48da123117e7b430b2 Template:Hatnote 10 48 92 2024-05-11T23:09:09Z NoKiAthami 2 Created page with "<includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki <includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 4a1d1028d07c9056022807a96051e1c82cf2a1c7 Module:Hatnote 828 49 93 2024-05-11T23:09:59Z NoKiAthami 2 Created page with "-------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules...." Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 Template:No redirect 10 50 94 2024-05-11T23:12:32Z NoKiAthami 2 Created page with "{{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} }}<noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} }}<noinclude> {{documentation}} </noinclude> 1760035b1bed54ee08b810208ed3551b812dfe13 Module:Redirect 828 51 95 2024-05-11T23:13:01Z NoKiAthami 2 Created page with "-- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redi..." Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 Module:Message box 828 52 96 2024-05-11T23:15:43Z NoKiAthami 2 Created page with "require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions ---------------------------------------------------------------------------..." Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) f2fb84f7b817d2d88747f57c40902a0d8be8158a Module:Message box/configuration 828 53 97 2024-05-11T23:16:40Z NoKiAthami 2 Created page with "-------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-spee..." Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } 49dc54b386118c78d3d31440487ab56706e40048 Module:Message box/ombox.css 828 54 98 2024-05-11T23:17:35Z NoKiAthami 2 Created page with "/* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; color: #202122; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-cont..." sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; color: #202122; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 51da8e3a249d31a9cc20677c28206961500c2430 Template:Mbox 10 55 99 2024-05-11T23:17:43Z NoKiAthami 2 Created page with "{{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude>" wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5bfb2becf8bed35974b47e3ff8660dc14bee40c7 Template:Cat 10 56 100 2024-05-11T23:18:23Z NoKiAthami 2 Created page with "[[:Category:{{PAGENAME:{{{1}}}}}]]<noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki [[:Category:{{PAGENAME:{{{1}}}}}]]<noinclude> {{documentation}} </noinclude> 1bc496e43140b2151295691ec72e6d251bb0b6cb Template:Talk other 10 57 101 2024-05-11T23:19:02Z NoKiAthami 2 Created page with "{{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | talk | other }} }} | talk = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | talk | other }} }} | talk = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} </noinclude> a8a973e372c5984a59953eb0cb4767a03dc6cd3c Template:Rcat shell 10 58 102 2024-05-11T23:19:24Z NoKiAthami 2 Created page with "__NONEWSECTIONLINK__{{Mbox | name = Redirect category shell | type = move | image = none | style = margin-top: 1.1em; border: solid 1px darkblue; border-left-width: 0.5em; | textstyle = padding-top: 0.9em; padding-bottom: 0.9em; | text = '''This {{Talk other|talk page|page}} is a [[Wikipedia:Redirect|redirect]]. <small>The following [[Wikipedia:Categorizing redirects|categories]] are used to track and monitor this redirect:</small>'''{{#if:{{{h|}}} |:: ''{{{h}}}''..." wikitext text/x-wiki __NONEWSECTIONLINK__{{Mbox | name = Redirect category shell | type = move | image = none | style = margin-top: 1.1em; border: solid 1px darkblue; border-left-width: 0.5em; | textstyle = padding-top: 0.9em; padding-bottom: 0.9em; | text = '''This {{Talk other|talk page|page}} is a [[Wikipedia:Redirect|redirect]]. <small>The following [[Wikipedia:Categorizing redirects|categories]] are used to track and monitor this redirect:</small>'''{{#if:{{{h|}}} |:: ''{{{h}}}'' }}<!-- Automatically detect protected redirects: --><includeonly>{{#switch: {{PROTECTIONLEVEL:move}} |sysop|templateeditor|extendedconfirmed={{pp-move|small=yes}} }}{{#switch: {{PROTECTIONLEVEL:edit}} |sysop={{pp-protected|small=yes}}{{R fully-protected|embed=yes}} |templateeditor={{pp-protected|small=yes}}{{R template protected|embed=yes}} |extendedconfirmed={{pp-protected|small=yes}}{{R extended-protected|embed=yes}} |autoconfirmed={{pp-protected|small=yes}}{{R semi-protected|embed=yes}} | <!--Not protected, or only semi-move-protected--> }}</includeonly>{{#if: {{{1|}}}||<includeonly> * {{red|'''Important – Please Read! {{maroon|This template should {{em|not}} be applied without parameters by bot nor by any automated or semi-automated process. It should {{em|not}} be used without parameters {{em|unless you want to learn how to categorize redirects}}. For editors who want to learn how to categorize redirects, this template is a {{em|learning tool}}. {{em|Only}} those editors who intend to return to the redirect to learn which rcats to use should apply this template without parameters, or with an empty first parameter!}}'''}}</includeonly> * '''Manifold sort''': If help is needed to determine appropriate categories, then this redirect populates '''{{Cat|Miscellaneous redirects}}'''. Monitors of that category will check this redirect and add or remove [[Wikipedia:Categorizing redirects|rcats]] as needed.{{#ifeq: {{lc:{{{nocat|false}}}}} | false |{{{category|<includeonly>[[Category:Miscellaneous redirects]]</includeonly>}}}}} }} {{#if: {{{2|}}}|{{{2}}}|{{{1|}}}}}{{#if: {{{1|}}}{{{2|}}}||{{#ifeq: {{ROOTPAGENAME}}|Redirect category shell||[[Category:Redirect category shell without parameters]]}}}} ''<small>When appropriate, [[Wikipedia:Protection policy|protection levels]] are automatically sensed, described and categorized.</small>'' }}<noinclude> {{Documentation}} </noinclude> 9fc97beec25c6dd7f5ccd95f748cdf13972d4c3b Module:Hatnote/styles.css 828 59 103 2024-05-11T23:20:20Z NoKiAthami 2 Created page with "/* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; }" sanitized-css text/css /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Template:Noredirect 10 60 104 2024-05-11T23:21:03Z NoKiAthami 2 Created page with "{{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} }}<noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#invoke:Redirect|isRedirect|{{{1}}}}} | <span class="plainlinks">[{{safesubst:<noinclude/>fullurl:{{{1}}}|redirect=no}} {{{2|{{{1}}}}}}]</span> | {{safesubst:<noinclude/>#if:{{{2|}}}|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}|{{{2}}}]]|[[:{{safesubst:<noinclude/>FULLPAGENAME:{{{1}}}}}]]}} }}<noinclude> {{documentation}} </noinclude> 1760035b1bed54ee08b810208ed3551b812dfe13 Template:End hidden 10 61 105 2024-05-11T23:22:12Z NoKiAthami 2 Created page with "<includeonly></div></div></includeonly><noinclude> {{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}} {{Documentation|Template:Hidden begin/doc}} </noinclude>" wikitext text/x-wiki <includeonly></div></div></includeonly><noinclude> {{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}} {{Documentation|Template:Hidden begin/doc}} </noinclude> 6cc7eb4776ef10092d5f7d48da123117e7b430b2 Template:Hidden begin/styles.css 10 62 106 2024-05-11T23:22:59Z NoKiAthami 2 Created page with "/* {{pp-template}} */ .hidden-begin { box-sizing: border-box; width: 100%; padding: 5px; border: none; font-size: 95%; } .hidden-title { font-weight: bold; line-height: 1.6; text-align: left; } .hidden-content { text-align: left; } /* [[phab:T360582]] */ @media all and ( max-width: 500px ) { .hidden-begin { width: auto !important; clear: none !important; float: none !important; } }" sanitized-css text/css /* {{pp-template}} */ .hidden-begin { box-sizing: border-box; width: 100%; padding: 5px; border: none; font-size: 95%; } .hidden-title { font-weight: bold; line-height: 1.6; text-align: left; } .hidden-content { text-align: left; } /* [[phab:T360582]] */ @media all and ( max-width: 500px ) { .hidden-begin { width: auto !important; clear: none !important; float: none !important; } } 5e8fdfe60dfb642d37ef0a54e1d25523b565ac11 Mangalic Language Family 0 63 107 2024-05-11T23:43:43Z NoKiAthami 2 Created page with "The Mangalic languages are a group of languages spoken mainly by the inhabitants of the Western island of [[Mangalitia]]. == Mangalic family tree == {{Tree list|title=Mangalic family}} * [[Proto-Mangalic]] ** Western Mangalic *** Balopoan of Biatuna **** Central Balopoan languages ***** Möna ***** Ra'i ****** Mi ***** T'umpa ****** Pants ****** Rhiani *** Kaonese *** Western Balopoan languages **** Bami ***** Muk **** Chòn'ý ** Eastern Mangalic *** Ancient Mangalese..." wikitext text/x-wiki The Mangalic languages are a group of languages spoken mainly by the inhabitants of the Western island of [[Mangalitia]]. == Mangalic family tree == {{Tree list|title=Mangalic family}} * [[Proto-Mangalic]] ** Western Mangalic *** Balopoan of Biatuna **** Central Balopoan languages ***** Möna ***** Ra'i ****** Mi ***** T'umpa ****** Pants ****** Rhiani *** Kaonese *** Western Balopoan languages **** Bami ***** Muk **** Chòn'ý ** Eastern Mangalic *** Ancient Mangalese **** [[Mangalese]] ***** Northern Dialects ***** Southern Dialects *** Ancient Laoanese **** Laoanese continuum ***** Kimiatsio Laoanese ***** Marean ***** Apaxo† {{Tree list/end}} d1b610170180d49eec5dad1fc6ac8465f37e1a0d Piukama 0 45 108 88 2024-05-11T23:47:08Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == {{Tree list}} * Khi '''(1)''' (2045-2022 BCE) ** Muntsa '''(2)''' (2022-2020 BCE) ** Hup '''(3)''' (2020-1989 BCE) *** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{Tree list}} * Pailamu (1973-1962 BCE) ** Shukhi ** Hup II ** Amia {{Tree list/end}} fe01112b5f007f81d519677709be413e76e251cd Module:Side box/styles.css 828 64 109 2024-05-12T08:22:36Z NoKiAthami 2 Created page with "/* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: #f9f9f9; display: flow-root; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of sid..." sanitized-css text/css /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: #f9f9f9; display: flow-root; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; min-width: 0; } } @media (min-width: 720px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } f3c24b817d80a66d283d974906aa851ac4768517 Template:Plainlist/styles.css 10 65 110 2024-05-12T08:23:17Z NoKiAthami 2 Created page with "/* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; }" sanitized-css text/css /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Template:Side box 10 66 111 2024-05-12T08:23:31Z NoKiAthami 2 Created page with "{{#invoke:Side box|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki {{#invoke:Side box|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> f02d48c7bd2f7bc64e2982d16b3578c99137d27e Template:Sister project 10 67 112 2024-05-12T08:24:16Z NoKiAthami 2 Created page with "{{Side box | metadata=no | position = {{{position|}}} | image = {{#switch: {{{image|}}} | none = <!-- "image=none", do nothing --> | = <!-- No image fed, select an image --> File:{{#switch: {{lc: {{{project|}}} }} | commons|c = Commons-logo.svg | meta|metawiki|m = Wikimedia Community Logo.svg | wikibooks|wbk|wb|b = Wikibooks-logo-en-noslogan.svg | wikidata|data = Wikidata-logo.svg | wikiquote..." wikitext text/x-wiki {{Side box | metadata=no | position = {{{position|}}} | image = {{#switch: {{{image|}}} | none = <!-- "image=none", do nothing --> | = <!-- No image fed, select an image --> [[File:{{#switch: {{lc: {{{project|}}} }} | commons|c = Commons-logo.svg | meta|metawiki|m = Wikimedia Community Logo.svg | wikibooks|wbk|wb|b = Wikibooks-logo-en-noslogan.svg | wikidata|data = Wikidata-logo.svg | wikiquote|quote|wqt|q = Wikiquote-logo.svg | wikipedia|wp|w|iw = Wikipedia-logo-v2.svg | wikisource|source|ws|s = Wikisource-logo.svg | wiktionary|wikt|wkt|wdy|d = Wiktionary-logo-en-v2.svg | wikinews|news|wnw|n = Wikinews-logo.svg | wikispecies|species = Wikispecies-logo.svg | wikiversity|wvy|v = Wikiversity logo 2017.svg | wikivoyage|voyage|voy = Wikivoyage-Logo-v3-icon.svg | mediawiki|mw = MediaWiki-2020-icon.svg | outreachwiki|outreach = Wikimedia Outreach.png | incubator = Incubator-notext.svg | wikifunctions = Wikifunctions-logo.svg | #default = Wikimedia-logo.svg }}|40x40px|class=noviewer|alt=|link= ]] | #default = {{{image|}}} }} | textclass = {{{textclass|plainlist}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} | below = {{{below|}}} | imageright = {{{imageright|}}} | class = plainlinks sistersitebox }}<noinclude>{{Documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> 9bab46e6907b835c6af71184149f8c81afa6f1b1 Template:If then show 10 68 113 2024-05-12T08:25:10Z NoKiAthami 2 Created page with "{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{3|}}}{{{1|}}}{{{4|}}}|{{{2|}}}}}<noinclude> {{Documentation}} </noinclude>" wikitext text/x-wiki {{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{3|}}}{{{1|}}}{{{4|}}}|{{{2|}}}}}<noinclude> {{Documentation}} </noinclude> 3f1216512c3d3bd85a7b05b2dd86d22f74b10784 Module:String 828 69 114 2024-05-12T08:26:10Z NoKiAthami 2 Created page with "--[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error c..." Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The first index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 2ad0905c56ef4955950b75a8f00974fe82aed5e4 Module:WikidataIB 828 70 115 2024-05-12T08:26:36Z NoKiAthami 2 Created page with "-- Version: 2023-07-10 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page. -- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances -- Fields in whitelist return local value if it exists or the Wikidata value otherwise -- The name of the field that thi..." Scribunto text/plain -- Version: 2023-07-10 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page. -- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances -- Fields in whitelist return local value if it exists or the Wikidata value otherwise -- The name of the field that this function is called from is passed in named parameter |name -- The name is compulsory when blacklist or whitelist is used, -- so the module returns nil if it is not supplied. -- blacklist is passed in named parameter |suppressfields (or |spf) -- whitelist is passed in named parameter |fetchwikidata (or |fwd) require("strict") local p = {} local cdate -- initialise as nil and only load _complex_date function if needed -- Module:Complex date is loaded lazily and has the following dependencies: -- Module:Calendar -- Module:ISOdate -- Module:DateI18n -- Module:I18n/complex date -- Module:Ordinal -- Module:I18n/ordinal -- Module:Yesno -- Module:Formatnum -- Module:Linguistic -- -- The following, taken from https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times, -- is needed to use Module:Complex date which seemingly requires date precision as a string. -- It would work better if only the authors of the mediawiki page could spell 'millennium'. local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local i18n = { ["errors"] = { ["property-not-found"] = "Property not found.", ["No property supplied"] = "No property supplied", ["entity-not-found"] = "Wikidata entity not found.", ["unknown-claim-type"] = "Unknown claim type.", ["unknown-entity-type"] = "Unknown entity type.", ["qualifier-not-found"] = "Qualifier not found.", ["site-not-found"] = "Wikimedia project not found.", ["labels-not-found"] = "No labels found.", ["descriptions-not-found"] = "No descriptions found.", ["aliases-not-found"] = "No aliases found.", ["unknown-datetime-format"] = "Unknown datetime format.", ["local-article-not-found"] = "Article is available on Wikidata, but not on Wikipedia", ["dab-page"] = " (dab)", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["century"] = "century", ["BC"] = "BC", ["BCE"] = "BCE", ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" }, ["filespace"] = "File", ["Unknown"] = "Unknown", ["NaN"] = "Not a number", -- set the following to the name of a tracking category, -- e.g. "[[Category:Articles with missing Wikidata information]]", or "" to disable: ["missinginfocat"] = "[[Category:Articles with missing Wikidata information]]", ["editonwikidata"] = "Edit this on Wikidata", ["latestdatequalifier"] = function (date) return "before " .. date end, -- some languages, e.g. Bosnian use a period as a suffix after each number in a date ["datenumbersuffix"] = "", ["list separator"] = ", ", ["multipliers"] = { [0] = "", [3] = " thousand", [6] = " million", [9] = " billion", [12] = " trillion", } } -- This allows an internationisation module to override the above table if 'en' ~= mw.getContentLanguage():getCode() then require("Module:i18n").loadI18n("Module:WikidataIB/i18n", i18n) end -- This piece of html implements a collapsible container. Check the classes exist on your wiki. local collapsediv = '<div class="mw-collapsible mw-collapsed" style="width:100%; overflow:auto;" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">' -- Some items should not be linked. -- Each wiki can create a list of those in Module:WikidataIB/nolinks -- It should return a table called itemsindex, containing true for each item not to be linked local donotlink = {} local nolinks_exists, nolinks = pcall(mw.loadData, "Module:WikidataIB/nolinks") if nolinks_exists then donotlink = nolinks.itemsindex end -- To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. -- The submodule [[Module:WikidataIB/titleformats]] lists the entity-ids used in 'instance of' (P31), -- which allows this module to identify the values that should be formatted. -- WikidataIB/titleformats exports a table p.formats, which is indexed by entity-id, and contains the value " or '' local formats = {} local titleformats_exists, titleformats = pcall(mw.loadData, "Module:WikidataIB/titleformats") if titleformats_exists then formats = titleformats.formats end ------------------------------------------------------------------------------- -- Private functions ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with the above: -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local makeOrdinal = function(cardinal) local ordsuffix = i18n.ordinal.default if cardinal % 10 == 1 then ordsuffix = i18n.ordinal[1] elseif cardinal % 10 == 2 then ordsuffix = i18n.ordinal[2] elseif cardinal % 10 == 3 then ordsuffix = i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then ordsuffix = i18n.ordinal.default end return tostring(cardinal) .. ordsuffix end ------------------------------------------------------------------------------- -- findLang takes a "langcode" parameter if supplied and valid -- otherwise it tries to create it from the user's set language ({{int:lang}}) -- failing that it uses the wiki's content language. -- It returns a language object ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langobj = mw.language.getContentLanguage() end end return langobj end ------------------------------------------------------------------------------- -- _getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getItemLangCode = function(qid) qid = mw.text.trim(qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local prop17 = mw.wikibase.getBestStatements(qid, "P17")[1] if not prop17 or prop17.mainsnak.snaktype ~= "value" then return end local qid17 = prop17.mainsnak.datavalue.value.id local prop37 = mw.wikibase.getBestStatements(qid17, "P37")[1] if not prop37 or prop37.mainsnak.snaktype ~= "value" then return end local qid37 = prop37.mainsnak.datavalue.value.id local prop424 = mw.wikibase.getBestStatements(qid37, "P424")[1] if not prop424 or prop424.mainsnak.snaktype ~= "value" then return end return prop424.mainsnak.datavalue.value end ------------------------------------------------------------------------------- -- roundto takes a number (x) -- and returns it rounded to (sf) significant figures ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local roundto = function(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end return x end ------------------------------------------------------------------------------- -- decimalToDMS takes a decimal degrees (x) with precision (p) -- and returns degrees/minutes/seconds according to the precision ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalToDMS = function(x, p) -- if p is not supplied, use a precision around 0.1 seconds if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then -- precision is > 1/2 a degree if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then -- precision is > 1/2 a minute if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then -- precision is > 1/2 a second s = math.floor(s + 0.5) elseif p > 0.000014 then -- precision is > 1/20 second s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then -- precision is > 1/200 second s = math.floor(100 * s + 0.5) / 100 else -- cap it at 3 dec places for now s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end ------------------------------------------------------------------------------- -- decimalPrecision takes a decimal (x) with precision (p) -- and returns x rounded approximately to the given precision -- precision should be between 1 and 1e-6, preferably a power of 10. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalPrecision = function(x, p) local s = 1 if x < 0 then x = -x s = -1 end -- if p is not supplied, pick an arbitrary precision if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end -- if it's less than 1e-4, it will be in exponent form, so return a string with 6dp -- 9e-5 becomes 0.000090 if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end ------------------------------------------------------------------------------- -- formatDate takes a datetime of the usual format from mw.wikibase.entity:formatPropertyValues -- like "1 August 30 BCE" as parameter 1 -- and formats it according to the df (date format) and bc parameters -- df = ["dmy" / "mdy" / "y"] default will be "dmy" -- bc = ["BC" / "BCE"] default will be "BCE" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local format_Date = function(datetime, dateformat, bc) local datetime = datetime or "1 August 30 BCE" -- in case of nil value -- chop off multiple vales and/or any hours, mins, etc. -- keep anything before punctuation - we just want a single date: local dateval = string.match( datetime, "[%w ]+") local dateformat = string.lower(dateformat or "dmy") -- default to dmy local bc = string.upper(bc or "") -- can't use nil for bc -- we only want to accept two possibilities: BC or default to BCE if bc == "BC" then bc = "&nbsp;" .. i18n["BC"] -- prepend a non-breaking space. else bc = "&nbsp;" .. i18n["BCE"] end local postchrist = true -- start by assuming no BCE local dateparts = {} for word in string.gmatch(dateval, "%w+") do if word == "BCE" or word == "BC" then -- *** internationalise later *** postchrist = false else -- we'll keep the parts that are not 'BCE' in a table dateparts[#dateparts + 1] = word end end if postchrist then bc = "" end -- set AD dates to no suffix *** internationalise later *** local sep = "&nbsp;" -- separator is nbsp local fdate = table.concat(dateparts, sep) -- set formatted date to same order as input -- if we have day month year, check dateformat if #dateparts == 3 then if dateformat == "y" then fdate = dateparts[3] elseif dateformat == "mdy" then fdate = dateparts[2] .. sep .. dateparts[1] .. "," .. sep .. dateparts[3] end elseif #dateparts == 2 and dateformat == "y" then fdate = dateparts[2] end return fdate .. bc end ------------------------------------------------------------------------------- -- dateFormat is the handler for properties that are of type "time" -- It takes timestamp, precision (6 to 11 per mediawiki), dateformat (y/dmy/mdy), BC format (BC/BCE), -- a plaindate switch (yes/no/adj) to en/disable "sourcing circumstances"/use adjectival form, -- any qualifiers for the property, the language, and any adjective to use like 'before'. -- It passes the date through the "complex date" function -- and returns a string with the internatonalised date formatted according to preferences. ------------------------------------------------------------------------------- -- Dependencies: findLang(); cdate(); dp[] ------------------------------------------------------------------------------- local dateFormat = function(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) -- output formatting according to preferences (y/dmy/mdy/ymd) df = (df or ""):lower() -- if ymd is required, return the part of the timestamp in YYYY-MM-DD form -- but apply Year zero#Astronomers fix: 1 BC = 0000; 2 BC = -0001; etc. if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end -- A year can be stored like this: "+1872-00-00T00:00:00Z", -- which is processed here as if it were the day before "+1872-01-01T00:00:00Z", -- and that's the last day of 1871, so the year is wrong. -- So fix the month 0, day 0 timestamp to become 1 January instead: timestamp = timestamp:gsub("%-00%-00T", "-01-01T") -- just in case date precision is missing dprec = dprec or 11 -- override more precise dates if required dateformat is year alone: if df == "y" and dprec > 9 then dprec = 9 end -- complex date only deals with precisions from 6 to 11, so clip range dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec -- BC format is "BC" or "BCE" bcf = (bcf or ""):upper() -- plaindate only needs the first letter (y/n/a) pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end -- in case language isn't passed lang = lang or findLang().code -- set adj as empty if nil adj = adj or "" -- extract the day, month, year from the timestamp local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) -- if year is missing, let it throw an error -- this will adjust the date format to be compatible with cdate -- possible formats are Y, YY, YYY0, YYYY, YYYY-MM, YYYY-MM-DD if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end -- add "circa" (Q5727902) from "sourcing circumstances" (P1480) local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end -- deal with Julian dates: -- no point in saying that dates before 1582 are Julian - they are by default -- doesn't make sense for dates less precise than year -- we can suppress it by setting |plaindate, e.g. for use in constructing categories. local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end if not cdate then cdate = require("Module:Complex date")._complex_date end local fdate = cdate(calendarmodel, adj, tostring(iso), dp[dprec], bc, "", "", "", "", lang, 1) -- this may have QuickStatements info appended to it in a div, so remove that fdate = fdate:gsub(' <div style="display: none;">[^<]*</div>', '') -- it may also be returned wrapped in a microformat, so remove that fdate = fdate:gsub("<[^>]*>", "") -- there may be leading zeros that we should remove fdate = fdate:gsub("^0*", "") -- if a plain date is required, then remove any links (like BC linked) if pd then fdate = fdate:gsub("%[%[.*|", ""):gsub("]]", "") end -- if 'circa', use the abbreviated form *** internationalise later *** fdate = fdate:gsub('circa ', '<abbr title="circa">c.</abbr>&nbsp;') -- deal with BC/BCE if bcf == "BCE" then fdate = fdate:gsub('BC', 'BCE') end -- deal with mdy format if df == "mdy" then fdate = fdate:gsub("(%d+) (%w+) (%d+)", "%2 %1, %3") end -- deal with adjectival form *** internationalise later *** if pd == "a" then fdate = fdate:gsub(' century', '-century') end return fdate end ------------------------------------------------------------------------------- -- parseParam takes a (string) parameter, e.g. from the list of frame arguments, -- and makes "false", "no", and "0" into the (boolean) false -- it makes the empty string and nil into the (boolean) value passed as default -- allowing the parameter to be true or false by default. -- It returns a boolean. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseParam = function(param, default) if type(param) == "boolean" then param = tostring(param) end if param and param ~= "" then param = param:lower() if (param == "false") or (param:sub(1,1) == "n") or (param == "0") then return false else return true end else return default end end ------------------------------------------------------------------------------- -- _getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getSitelink = function(qid, wiki) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end wiki = wiki or "" local sitelink if wiki == "" then sitelink = mw.wikibase.getSitelink(qid) else sitelink = mw.wikibase.getSitelink(qid, wiki) end return sitelink end ------------------------------------------------------------------------------- -- _getCommonslink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the Wikidata entity - but not if onlycat=true and it's not a category; -- the Commons sitelink of the topic's main category of the Wikidata entity; -- the Commons category of the Wikidata entity - unless fallback=false. ------------------------------------------------------------------------------- -- Dependencies: _getSitelink(); parseParam() ------------------------------------------------------------------------------- local _getCommonslink = function(qid, onlycat, fallback) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end onlycat = parseParam(onlycat, false) if fallback == "" then fallback = nil end local sitelink = _getSitelink(qid, "commonswiki") if onlycat and sitelink and sitelink:sub(1,9) ~= "Category:" then sitelink = nil end if not sitelink then -- check for topic's main category local prop910 = mw.wikibase.getBestStatements(qid, "P910")[1] if prop910 then local tmcid = prop910.mainsnak.datavalue and prop910.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end if not sitelink then -- check for list's main category local prop1754 = mw.wikibase.getBestStatements(qid, "P1754")[1] if prop1754 then local tmcid = prop1754.mainsnak.datavalue and prop1754.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end end end if not sitelink and fallback then -- check for Commons category (string value) local prop373 = mw.wikibase.getBestStatements(qid, "P373")[1] if prop373 then sitelink = prop373.mainsnak.datavalue and prop373.mainsnak.datavalue.value if sitelink then sitelink = "Category:" .. sitelink end end end return sitelink end ------------------------------------------------------------------------------- -- The label in a Wikidata item is subject to vulnerabilities -- that an attacker might try to exploit. -- It needs to be 'sanitised' by removing any wikitext before use. -- If it doesn't exist, return the id for the item -- a second (boolean) value is also returned, value is true when the label exists ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local labelOrId = function(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) else label = mw.wikibase.getLabel(id) end if label then return mw.text.nowiki(label), true else return id, false end end ------------------------------------------------------------------------------- -- linkedItem takes an entity-id and returns a string, linked if possible. -- This is the handler for "wikibase-item". Preferences: -- 1. Display linked disambiguated sitelink if it exists -- 2. Display linked label if it is a redirect -- 3. TBA: Display an inter-language link for the label if it exists other than in default language -- 4. Display unlinked label if it exists -- 5. Display entity-id for now to indicate a label could be provided -- dtxt is text to be used instead of label, or nil. -- shortname is boolean switch to use P1813 (short name) instead of label if true. -- lang is the current language code. -- uselbl is boolean switch to force display of the label instead of the sitelink (default: false) -- linkredir is boolean switch to allow linking to a redirect (default: false) -- formatvalue is boolean switch to allow formatting as italics or quoted (default: false) ------------------------------------------------------------------------------- -- Dependencies: labelOrId(); donotlink[] ------------------------------------------------------------------------------- local linkedItem = function(id, args) local lprefix = (args.lp or args.lprefix or args.linkprefix or ""):gsub('"', '') -- toughen against nil values passed local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local shortname = args.shortname or args.sn local lang = args.lang or "en" -- fallback to default if missing local uselbl = args.uselabel or args.uselbl uselbl = parseParam(uselbl, false) local linkredir = args.linkredir linkredir = parseParam(linkredir, false) local formatvalue = args.formatvalue or args.fv formatvalue = parseParam(formatvalue, false) -- see if item might need italics or quotes local fmt = "" if next(formats) and formatvalue then for k, v in ipairs( mw.wikibase.getBestStatements(id, "P31") ) do if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then fmt = formats[v.mainsnak.datavalue.value.id] break -- pick the first match end end end local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true elseif shortname then -- see if there is a shortname in our language, and set label to it for k, v in ipairs( mw.wikibase.getBestStatements(id, "P1813") ) do if v.mainsnak.datavalue.value.language == lang then label, islabel = v.mainsnak.datavalue.value.text, true break end -- test for language match end -- loop through values of short name -- if we have no label set, then there was no shortname available if not islabel then label, islabel = labelOrId(id) shortname = false end else label, islabel = labelOrId(id) end if mw.site.siteName ~= "Wikimedia Commons" then if sitelink then if not (dtxt or shortname) then -- if sitelink and label are the same except for case, no need to process further if sitelink:lower() ~= label:lower() then -- strip any namespace or dab from the sitelink local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then -- that prefix is a valid namespace, so remove it slink = sitelink:sub(pos+1) end end -- remove stuff after commas or inside parentheses - ie. dabs slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") -- if uselbl is false, use sitelink instead of label if not uselbl then -- use slink as display, preserving label case - find("^%u") is true for 1st char uppercase if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end end end if donotlink[label] then disp = prefix .. fmt .. label .. fmt .. postfix else disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end elseif islabel then -- no sitelink, label exists, so check if a redirect with that title exists, if linkredir is true -- display plain label by default disp = prefix .. fmt .. label .. fmt .. postfix if linkredir then local artitle = mw.title.new(label, 0) -- only nil if label has invalid chars if not donotlink[label] and artitle and artitle.redirectTarget then -- there's a redirect with the same title as the label, so let's link to that disp = "[[".. lprefix .. label .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end end -- test if article title exists as redirect on current Wiki else -- no sitelink and no label, so return whatever was returned from labelOrId for now -- add tracking category [[Category:Articles with missing Wikidata information]] -- for enwiki, just return the tracking category if mw.wikibase.getGlobalSiteId() == "enwiki" then disp = i18n.missinginfocat else disp = prefix .. label .. postfix .. i18n.missinginfocat end end else local ccat = mw.wikibase.getBestStatements(id, "P373")[1] if ccat and ccat.mainsnak.datavalue then ccat = ccat.mainsnak.datavalue.value disp = "[[" .. lprefix .. "Category:" .. ccat .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif sitelink then -- this asumes that if a sitelink exists, then a label also exists disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" else -- no sitelink and no Commons cat, so return label from labelOrId for now disp = prefix .. label .. postfix end end return disp end ------------------------------------------------------------------------------- -- sourced takes a table representing a statement that may or may not have references -- it looks for a reference sourced to something not containing the word "wikipedia" -- it returns a boolean = true if it finds a sourced reference. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local sourced = function(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end ------------------------------------------------------------------------------- -- setRanks takes a flag (parameter passed) that requests the values to return -- "b[est]" returns preferred if available, otherwise normal -- "p[referred]" returns preferred -- "n[ormal]" returns normal -- "d[eprecated]" returns deprecated -- multiple values are allowed, e.g. "preferred normal" (which is the default) -- "best" will override the other flags, and set p and n ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local setRanks = function(rank) rank = (rank or ""):lower() -- if nothing passed, return preferred and normal -- if rank == "" then rank = "p n" end local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end -- check if "best" is requested or no ranks requested; and if so, set preferred and normal if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end ------------------------------------------------------------------------------- -- parseInput processes the Q-id , the blacklist and the whitelist -- if an input parameter is supplied, it returns that and ends the call. -- it returns (1) either the qid or nil indicating whether or not the call should continue -- and (2) a table containing all of the statements for the propertyID and relevant Qid -- if "best" ranks are requested, it returns those instead of all non-deprecated ranks ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseInput = function(frame, input_parm, property_id) -- There may be a local parameter supplied, if it's blank, set it to nil input_parm = mw.text.trim(input_parm or "") if input_parm == "" then input_parm = nil end -- return nil if Wikidata is not available if not mw.wikibase then return false, input_parm end local args = frame.args -- can take a named parameter |qid which is the Wikidata ID for the article. -- if it's not supplied, use the id for the current page local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end -- if there's no Wikidata item for the current page return nil if not qid then return false, input_parm end -- The blacklist is passed in named parameter |suppressfields local blacklist = args.suppressfields or args.spf or "" -- The whitelist is passed in named parameter |fetchwikidata local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end -- The name of the field that this function is called from is passed in named parameter |name local fieldname = args.name or "" if blacklist ~= "" then -- The name is compulsory when blacklist is used, so return nil if it is not supplied if fieldname == "" then return false, nil end -- If this field is on the blacklist, then return nil if blacklist:find(fieldname) then return false, nil end end -- If we got this far then we're not on the blacklist -- The blacklist overrides any locally supplied parameter as well -- If a non-blank input parameter was supplied return it if input_parm then return false, input_parm end -- We can filter out non-valid properties if property_id:sub(1,1):upper() ~="P" or property_id == "P0" then return false, nil end -- Otherwise see if this field is on the whitelist: -- needs a bit more logic because find will return its second value = 0 if fieldname is "" -- but nil if fieldname not found on whitelist local _, found = whitelist:find(fieldname) found = ((found or 0) > 0) if whitelist ~= 'ALL' and (whitelist:upper() == "NONE" or not found) then return false, nil end -- See what's on Wikidata (the call always returns a table, but it may be empty): local props = {} if args.reqranks.b then props = mw.wikibase.getBestStatements(qid, property_id) else props = mw.wikibase.getAllStatements(qid, property_id) end if props[1] then return qid, props end -- no property on Wikidata return false, nil end ------------------------------------------------------------------------------- -- createicon assembles the "Edit at Wikidata" pen icon. -- It returns a wikitext string inside a span class="penicon" -- if entityID is nil or empty, the ID associated with current page is used -- langcode and propertyID may be nil or empty ------------------------------------------------------------------------------- -- Dependencies: i18n[]; ------------------------------------------------------------------------------- local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. i18n["filespace"] .. ":OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n["editonwikidata"] .. "|link=https://www.wikidata.org/wiki/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n["editonwikidata"] .. "]]</span>" return icon end ------------------------------------------------------------------------------- -- assembleoutput takes the sequence table containing the property values -- and formats it according to switches given. It returns a string or nil. -- It uses the entityID (and optionally propertyID) to create a link in the pen icon. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); ------------------------------------------------------------------------------- local assembleoutput = function(out, args, entityID, propertyID) -- sorted is a boolean passed to enable sorting of the values returned -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local sorted = parseParam(args.sorted, false) -- noicon is a boolean passed to suppress the trailing "edit at Wikidata" icon -- for use when the value is processed further by the infobox -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local noic = parseParam(args.noicon, false) -- list is the name of a template that a list of multiple values is passed through -- examples include "hlist" and "ubl" -- setting it to "prose" produces something like "1, 2, 3, and 4" local list = args.list or "" -- sep is a string that is used to separate multiple returned values -- if nothing or an empty string is passed set it to the default -- any double-quotes " are stripped out, so that spaces may be passed -- e.g. |sep=" - " local sepdefault = i18n["list separator"] local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then separator = sepdefault end -- collapse is a number that determines the maximum number of returned values -- before the output is collapsed. -- Zero or not a number result in no collapsing (default becomes 0). local collapse = tonumber(args.collapse) or 0 -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging local replacetext = mw.text.trim(args.rt or args.replacetext or "") -- if there's anything to return, then return a list -- comma-separated by default, but may be specified by the sep parameter -- optionally specify a hlist or ubl or a prose list, etc. local strout if #out > 0 then if sorted then table.sort(out) end -- if there's something to display and a pen icon is wanted, add it the end of the last value local hasdisplay = false for i, v in ipairs(out) do if v ~= i18n.missinginfocat then hasdisplay = true break end end if not noic and hasdisplay then out[#out] = out[#out] .. createicon(args.langobj.code, entityID, propertyID) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText( out ) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end if collapse >0 and #out > collapse then strout = collapsediv .. strout .. "</div>" end else strout = nil -- no items had valid reference end if replacetext ~= "" and strout then strout = replacetext end return strout end ------------------------------------------------------------------------------- -- rendersnak takes a table (propval) containing the information stored on one property value -- and returns the value as a string and its language if monolingual text. -- It handles data of type: -- wikibase-item -- time -- string, url, commonsMedia, external-id -- quantity -- globe-coordinate -- monolingualtext -- It also requires linked, the link/pre/postfixes, uabbr, and the arguments passed from frame. -- The optional filter parameter allows quantities to be be filtered by unit Qid. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); labelOrId(); i18n[]; dateFormat(); -- roundto(); decimalPrecision(); decimalToDMS(); linkedItem(); ------------------------------------------------------------------------------- local rendersnak = function(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code -- allow values to display a fixed text instead of label local dtxt = args.displaytext or args.dt if dtxt == "" then dtxt = nil end -- switch to use display of short name (P1813) instead of label local shortname = args.shortname or args.sn shortname = parseParam(shortname, false) local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value -- value and monolingual text language code returned local val, mlt if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then -- val is nil: value has a rank that isn't requested ------------------------------------ elseif snak.snaktype == "somevalue" then -- value is unknown val = i18n["Unknown"] ------------------------------------ elseif snak.snaktype == "novalue" then -- value is none -- val = "No value" -- don't return anything ------------------------------------ elseif dtype == "wikibase-item" then -- data type is a wikibase item: -- it's wiki-linked value, so output as link if enabled and possible local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else -- no link wanted so check for display-text, otherwise test for lang code local label, islabel if dtxt then label = dtxt else label, islabel = labelOrId(qnumber) local langlabel = mw.wikibase.getLabelByLang(qnumber, args.lang) if langlabel then label = mw.text.nowiki( langlabel ) end end val = pre .. label .. post end -- test for link required ------------------------------------ elseif dtype == "time" then -- data type is time: -- time is in timestamp format -- date precision is integer per mediawiki -- output formatting according to preferences (y/dmy/mdy) -- BC format as BC or BCE -- plaindate is passed to disable looking for "sourcing cirumstances" -- or to set the adjectival form -- qualifiers (if any) is a nested table or nil -- lang is given, or user language, or site language -- -- Here we can check whether args.df has a value -- If not, use code from Module:Sandbox/RexxS/Getdateformat to set it from templates like {{Use mdy dates}} val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) ------------------------------------ -- data types which are strings: elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then -- commonsMedia or external-id or string or url -- all have mainsnak.datavalue.value as string if (lpre == "" or lpre == ":") and lpost == "" then -- don't link if no linkpre/postfix or linkprefix is just ":" val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end -- check for link requested (i.e. either linkprefix or linkpostfix exists) ------------------------------------ -- data types which are quantities: elseif dtype == "quantity" then -- quantities have mainsnak.datavalue.value.amount and mainsnak.datavalue.value.unit -- the unit is of the form http://www.wikidata.org/entity/Q829073 -- -- implement a switch to turn on/off numerical formatting later local fnum = true -- -- a switch to turn on/off conversions - only for en-wiki local conv = parseParam(args.conv or args.convert, false) -- if we have conversions, we won't have formatted numbers or scales if conv then uabbr = true fnum = false args.scale = "0" end -- -- a switch to turn on/off showing units, default is true local showunits = parseParam(args.su or args.showunits, true) -- -- convert amount to a number local amount = tonumber(dv.amount) or i18n["NaN"] -- -- scale factor for millions, billions, etc. local sc = tostring(args.scale or ""):sub(1,1):lower() local scale if sc == "a" then -- automatic scaling if amount > 1e15 then scale = 12 elseif amount > 1e12 then scale = 9 elseif amount > 1e9 then scale = 6 elseif amount > 1e6 then scale = 3 else scale = 0 end else scale = tonumber(args.scale) or 0 if scale < 0 or scale > 12 then scale = 0 end scale = math.floor(scale/3) * 3 end local factor = 10^scale amount = amount / factor -- ranges: local range = "" -- check if upper and/or lower bounds are given and significant local upb = tonumber(dv.upperBound) local lowb = tonumber(dv.lowerBound) if upb and lowb then -- differences rounded to 2 sig fig: local posdif = roundto(upb - amount, 2) / factor local negdif = roundto(amount - lowb, 2) / factor upb, lowb = amount + posdif, amount - negdif -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end if posdif ~= negdif then -- non-symmetrical range = " +" .. posdif .. " -" .. negdif elseif posdif ~= 0 then -- symmetrical and non-zero range = " ±" .. posdif else -- otherwise range is zero, so leave it as "" end else -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end end -- unit names and symbols: -- extract the qid in the form 'Qnnn' from the value.unit url -- and then fetch the label from that - or symbol if unitabbr is true local unit = "" local usep = "" local usym = "" local unitqid = string.match( dv.unit, "(Q%d+)" ) if filter and unitqid ~= filter then return nil end if unitqid and showunits then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then usep, unit = " ", uname end if uabbr then -- see if there's a unit symbol (P5061) local unitsymbols = mw.wikibase.getBestStatements(unitqid, "P5061") -- construct fallback table, add local lang and multiple languages local fbtbl = mw.language.getFallbacksFor( args.lang ) table.insert( fbtbl, 1, args.lang ) table.insert( fbtbl, 1, "mul" ) local found = false for idx1, us in ipairs(unitsymbols) do for idx2, fblang in ipairs(fbtbl) do if us.mainsnak.datavalue.value.language == fblang then usym = us.mainsnak.datavalue.value.text found = true break end if found then break end end -- loop through fallback table end -- loop through values of P5061 if found then usep, unit = "&nbsp;", usym end end end -- format display: if conv then if range == "" then val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {amount, unit}} else val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {lowb, "to", upb, unit}} end elseif unit == "$" or unit == "£" then val = unit .. amount .. range .. i18n.multipliers[scale] else val = amount .. range .. i18n.multipliers[scale] .. usep .. unit end ------------------------------------ -- datatypes which are global coordinates: elseif dtype == "globe-coordinate" then -- 'display' parameter defaults to "inline, title" *** unused for now *** -- local disp = args.display or "" -- if disp == "" then disp = "inline, title" end -- -- format parameter switches from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- not needed for now -- -- show parameter allows just the latitude, or just the longitude, or both -- to be returned as a signed decimal, ignoring the format parameter. local show = (args.show or ""):lower() if show ~= "longlat" then show = show:sub(1,3) end -- local lat, long, prec = dv.latitude, dv.longitude, dv.precision if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = "N" local ew = "E" if lat < 0 then ns = "S" lat = - lat end if long < 0 then ew = "W" long = - long end if form == "dec" then lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) val = lat .. "°" .. ns .. " " .. long .. "°" .. ew else local latdeg, latmin, latsec = decimalToDMS(lat, prec) local longdeg, longmin, longsec = decimalToDMS(long, prec) if latsec == 0 and longsec == 0 then if latmin == 0 and longmin == 0 then val = latdeg .. "°" .. ns .. " " .. longdeg .. "°" .. ew else val = latdeg .. "°" .. latmin .. "′" .. ns .. " " val = val .. longdeg .. "°".. longmin .. "′" .. ew end else val = latdeg .. "°" .. latmin .. "′" .. latsec .. "″" .. ns .. " " val = val .. longdeg .. "°" .. longmin .. "′" .. longsec .. "″" .. ew end end end ------------------------------------ elseif dtype == "monolingualtext" then -- data type is Monolingual text: -- has mainsnak.datavalue.value as a table containing language/text pairs -- collect all the values in 'out' and languages in 'mlt' and process them later val = pre .. dv.text .. post mlt = dv.language ------------------------------------ else -- some other data type so write a specific handler val = "unknown data type: " .. dtype end -- of datatype/unknown value/sourced check return val, mlt end ------------------------------------------------------------------------------- -- propertyvalueandquals takes a property object, the arguments passed from frame, -- and a qualifier propertyID. -- It returns a sequence (table) of values representing the values of that property -- and qualifiers that match the qualifierID if supplied. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); sourced(); labelOrId(); i18n.latestdatequalifier(); format_Date(); -- makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); assembleoutput(); ------------------------------------------------------------------------------- local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced or args.osd, true) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or args.lp or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdlinks or args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr or args.uabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly or args.qo, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.plaindate or args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or args.qualifierdateformat or args.df or (not qualsonly and "y") local lang = args.lang or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix or args.qlp, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, ["langobj"] = args.langobj, ["lang"] = args.langobj.code, ["df"] = args.qdf, ["sn"] = parseParam(args.qsn or args.qshortname, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do local datatype = objproperty[1].datatype or objproperty[1].mainsnak.datatype -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end ------------------------------------------------------------------------------- -- Common code for p.getValueByQual and p.getValueByLang ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getvaluebyqual = function(frame, qualID, checkvalue) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") if propertyID == "" then return "no property supplied" end if qualID == "" then return "no qualifier supplied" end -- onlysourced is a boolean passed to return property values -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, args[2], propertyID) local linked = parseParam(args.linked, true) local lpre = (args.linkprefix or args.lp or ""):gsub('"', '') local lpost = (args.linkpostfix or ""):gsub('"', '') local pre = (args.prefix or ""):gsub('"', '') local post = (args.postfix or ""):gsub('"', '') local uabbr = parseParam(args.unitabbr or args.uabbr, false) local filter = (args.unit or ""):upper() local maxvals = tonumber(args.maxvals) or 0 if filter == "" then filter = nil end if qid then local out = {} -- Scan through the values of the property -- we want something like property is "pronunciation audio (P443)" in propertyID -- with a qualifier like "language of work or name (P407)" in qualID -- whose value has the required ID, like "British English (Q7979)", in qval for k1, v1 in ipairs(props) do if v1.mainsnak.snaktype == "value" then -- check if it has the right qualifier local v1q = v1.qualifiers if v1q and v1q[qualID] then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- so see if matches the required value -- We'll only deal with wikibase-items and strings for now if v1q[qualID][1].datatype == "wikibase-item" then if checkvalue(v1q[qualID][1].datavalue.value.id) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end elseif v1q[qualID][1].datatype == "string" then if checkvalue(v1q[qualID][1].datavalue.value) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end end end -- of check for sourced end -- of check for matching required value and has qualifiers else return nil end -- of check for string if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- _location takes Q-id and follows P276 (location) -- or P131 (located in the administrative territorial entity) or P706 (located on terrain feature) -- from the initial item to higher level territories/locations until it reaches the highest. -- An optional boolean, 'first', determines whether the first item is returned (default: false). -- An optional boolean 'skip' toggles the display to skip to the last item (default: false). -- It returns a table containing the locations - linked where possible, except for the highest. ------------------------------------------------------------------------------- -- Dependencies: findLang(); labelOrId(); linkedItem ------------------------------------------------------------------------------- local _location = function(qid, first, skip) first = parseParam(first, false) skip = parseParam(skip, false) local locs = {"P276", "P131", "P706"} local out = {} local langcode = findLang():getCode() local finished = false local count = 0 local prevqid = "Q0" repeat local prop for i1, v1 in ipairs(locs) do local proptbl = mw.wikibase.getBestStatements(qid, v1) if #proptbl > 1 then -- there is more than one higher location local prevP131, prevP131id if prevqid ~= "Q0" then prevP131 = mw.wikibase.getBestStatements(prevqid, "P131")[1] prevP131id = prevP131 and prevP131.mainsnak.datavalue and prevP131.mainsnak.datavalue.value.id end for i2, v2 in ipairs(proptbl) do local parttbl = v2.qualifiers and v2.qualifiers.P518 if parttbl then -- this higher location has qualifier 'applies to part' (P518) for i3, v3 in ipairs(parttbl) do if v3.snaktype == "value" and v3.datavalue.value.id == prevqid then -- it has a value equal to the previous location prop = proptbl[i2] break end -- of test for matching last location end -- of loop through values of 'applies to part' else -- there's no qualifier 'applies to part' (P518) -- so check if the previous location had a P131 that matches this alternate if qid == prevP131id then prop = proptbl[i2] break end -- of test for matching previous P131 end end -- of loop through parent locations -- fallback to second value if match not found prop = prop or proptbl[2] elseif #proptbl > 0 then prop = proptbl[1] end if prop then break end end -- check if it's an instance of (P31) a country (Q6256) or sovereign state (Q3624078) -- and terminate the chain if it is local inst = mw.wikibase.getAllStatements(qid, "P31") if #inst > 0 then for k, v in ipairs(inst) do local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id -- stop if it's a country (or a country within the United Kingdom if skip is true) if instid == "Q6256" or instid == "Q3624078" or (skip and instid == "Q3336843") then prop = nil -- this will ensure this is treated as top-level location break end end end -- get the name of this location and update qid to point to the parent location if prop and prop.mainsnak.datavalue then if not skip or count == 0 then local args = { lprefix = ":" } out[#out+1] = linkedItem(qid, args) -- get a linked value if we can end qid, prevqid = prop.mainsnak.datavalue.value.id, qid else -- This is top-level location, so get short name except when this is the first item -- Use full label if there's no short name or this is the first item local prop1813 = mw.wikibase.getAllStatements(qid, "P1813") -- if there's a short name and this isn't the only item if prop1813[1] and (#out > 0)then local shortname -- short name is monolingual text, so look for match to the local language -- choose the shortest 'short name' in that language for k, v in pairs(prop1813) do if v.mainsnak.datavalue.value.language == langcode then local name = v.mainsnak.datavalue.value.text if (not shortname) or (#name < #shortname) then shortname = name end end end -- add the shortname if one is found, fallback to the label -- but skip it if it's "USA" if shortname ~= "USA" then out[#out+1] = shortname or labelOrId(qid) else if skip then out[#out+1] = "US" end end else -- no shortname, so just add the label local loc = labelOrId(qid) -- exceptions go here: if loc == "United States of America" then out[#out+1] = "United States" else out[#out+1] = loc end end finished = true end count = count + 1 until finished or count >= 10 -- limit to 10 levels to avoid infinite loops -- remove the first location if not required if not first then table.remove(out, 1) end -- we might have duplicate text for consecutive locations, so remove them if #out > 2 then local plain = {} for i, v in ipairs(out) do -- strip any links plain[i] = v:gsub("^%[%[[^|]*|", ""):gsub("]]$", "") end local idx = 2 repeat if plain[idx] == plain[idx-1] then -- duplicate found local removeidx = 0 if (plain[idx] ~= out[idx]) and (plain[idx-1] == out[idx-1]) then -- only second one is linked, so drop the first removeidx = idx - 1 elseif (plain[idx] == out[idx]) and (plain[idx-1] ~= out[idx-1]) then -- only first one is linked, so drop the second removeidx = idx else -- pick one removeidx = idx - (os.time()%2) end table.remove(out, removeidx) table.remove(plain, removeidx) else idx = idx +1 end until idx >= #out end return out end ------------------------------------------------------------------------------- -- _getsumofparts scans the property 'has part' (P527) for values matching a list. -- The list (args.vlist) consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifer 'quantity' (P1114), those quantites are summed. -- The sum is returned as a number (i.e. 0 if none) -- a table of arguments is supplied implementing the usual parameters. ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseParam; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getsumofparts = function(args) local vallist = (args.vlist or ""):upper() if vallist == "" then return end args.reqranks = setRanks(args.rank) local f = {} f.args = args local qid, props = parseInput(f, "", "P527") if not qid then return 0 end local onlysrc = parseParam(args.onlysourced or args.osd, true) local sum = 0 for k1, v1 in ipairs(props) do if (onlysrc == false or sourced(v1)) and v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" and vallist:match( v1.mainsnak.datavalue.value.id ) and v1.qualifiers then local quals = v1.qualifiers["P1114"] if quals then for k2, v2 in ipairs(quals) do sum = sum + v2.datavalue.value.amount end end end end return sum end ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Public functions ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- _getValue makes the functionality of getValue available to other modules ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p._getValue = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end -- implement eid parameter local eid = args.eid if eid == "" then return nil elseif eid then args.qid = eid end local propertyID = mw.text.trim(args[1] or "") args.reqranks = setRanks(args.rank) -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging, so we set fetchwikidata=ALL to fill the whitelist local replacetext = mw.text.trim(args.rt or args.replacetext or "") if replacetext ~= "" then args.fetchwikidata = "ALL" end local f = {} f.args = args local entityid, props = parseInput(f, f.args[2], propertyID) if not entityid then return props -- either the input parameter or nothing end -- qual is a string containing the property ID of the qualifier(s) to be returned -- if qual == "ALL" then all qualifiers returned -- if qual == "DATES" then qualifiers P580 (start time) and P582 (end time) returned -- if nothing or an empty string is passed set it nil -> no qualifiers returned local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end -- set a language object and code in the args table args.langobj = findLang(args.lang) args.lang = args.langobj.code -- table 'out' stores the return value(s): local out = propertyvalueandquals(props, args, qualID) -- format the table of values and return it as a string: return assembleoutput(out, args, entityid, propertyID) end ------------------------------------------------------------------------------- -- getValue is used to get the value(s) of a property -- The property ID is passed as the first unnamed parameter and is required. -- A locally supplied parameter may optionaly be supplied as the second unnamed parameter. -- The function will now also return qualifiers if parameter qual is supplied ------------------------------------------------------------------------------- -- Dependencies: _getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getValue = function(frame) local args= frame.args if not args[1] then args = frame:getParent().args if not args[1] then return i18n.errors["No property supplied"] end end return p._getValue(args) end ------------------------------------------------------------------------------- -- getPreferredValue is used to get a value, -- (or a comma separated list of them if multiple values exist). -- If preferred ranks are set, it will return those values, otherwise values with normal ranks -- now redundant to getValue with |rank=best ------------------------------------------------------------------------------- -- Dependencies: p.getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; -- parseParam; sourced; labelOrId; i18n.latestdatequalifier; format_Date; -- makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getPreferredValue = function(frame) frame.args.rank = "best" return p.getValue(frame) end ------------------------------------------------------------------------------- -- getCoords is used to get coordinates for display in an infobox -- whitelist and blacklist are implemented -- optional 'display' parameter is allowed, defaults to nil - was "inline, title" ------------------------------------------------------------------------------- -- Dependencies: setRanks(); parseInput(); decimalPrecision(); ------------------------------------------------------------------------------- p.getCoords = function(frame) local propertyID = "P625" -- if there is a 'display' parameter supplied, use it -- otherwise default to nothing local disp = frame.args.display or "" if disp == "" then disp = nil -- default to not supplying display parameter, was "inline, title" end -- there may be a format parameter to switch from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (frame.args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- just deal with best values frame.args.reqranks = setRanks("best") local qid, props = parseInput(frame, frame.args[1], propertyID) if not qid then return props -- either local parameter or nothing else local dv = props[1].mainsnak.datavalue.value local lat, long, prec = dv.latitude, dv.longitude, dv.precision lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) local lat_long = { lat, long } lat_long["display"] = disp lat_long["format"] = form -- invoke template Coord with the values stored in the table return frame:expandTemplate{title = 'coord', args = lat_long} end end ------------------------------------------------------------------------------- -- getQualifierValue is used to get a formatted value of a qualifier -- -- The call needs: a property (the unnamed parameter or 1=) -- a target value for that property (pval=) -- a qualifier for that target value (qual=) -- The usual whitelisting and blacklisting of the property is implemented -- The boolean onlysourced= parameter can be set to return nothing -- when the property is unsourced (or only sourced to Wikipedia) ------------------------------------------------------------------------------- -- Dependencies: parseParam(); setRanks(); parseInput(); sourced(); -- propertyvalueandquals(); assembleoutput(); -- labelOrId(); i18n.latestdatequalifier(); format_Date(); -- findLang(); makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); ------------------------------------------------------------------------------- p.getQualifierValue = function(frame) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") -- The value of the property we want to match whose qualifier value is to be returned -- is passed in named parameter |pval= local propvalue = frame.args.pval -- The property ID of the qualifier -- whose value is to be returned is passed in named parameter |qual= local qualifierID = frame.args.qual -- A filter can be set like this: filter=P642==Q22674854 local filter, fprop, fval local ftable = mw.text.split(frame.args.filter or "", "==") if ftable[2] then fprop = mw.text.trim(ftable[1]) fval = mw.text.trim(ftable[2]) filter = true end -- onlysourced is a boolean passed to return qualifiers -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set a language object and language code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} -- Scan through the values of the property -- we want something like property is P793, significant event (in propertyID) -- whose value is something like Q385378, construction (in propvalue) -- then we can return the value(s) of a qualifier such as P580, start time (in qualifierID) for k1, v1 in pairs(props) do if v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" then -- It's a wiki-linked value, so check if it's the target (in propvalue) and if it has qualifiers if v1.mainsnak.datavalue.value.id == propvalue and v1.qualifiers then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- which matches the target, so apply the filter and find the value(s) of the qualifier we want if not filter or (v1.qualifiers[fprop] and v1.qualifiers[fprop][1].datavalue.value.id == fval) then local quals = v1.qualifiers[qualifierID] if quals then -- can't reference qualifer, so set onlysourced = "no" (args are strings, not boolean) local qargs = frame.args qargs.onlysourced = "no" local vals = propertyvalueandquals(quals, qargs, qid) for k, v in ipairs(vals) do out[#out + 1] = v end end end end -- of check for sourced end -- of check for matching required value and has qualifiers end -- of check for wikibase entity end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- getSumOfParts scans the property 'has part' (P527) for values matching a list. -- The list is passed in parameter vlist. -- It consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifier 'quantity' (P1114), those quantities are summed. -- The sum is returned as a number or nothing if zero. ------------------------------------------------------------------------------- -- Dependencies: _getsumofparts; ------------------------------------------------------------------------------- p.getSumOfParts = function(frame) local sum = _getsumofparts(frame.args) if sum == 0 then return end return sum end ------------------------------------------------------------------------------- -- getValueByQual gets the value of a property which has a qualifier with a given entity value -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the ID of a qualifier for that property (qualID=Pyyy) -- either the Wikibase-entity ID of a value for that qualifier (qvalue=Qzzz) -- or a string value for that qualifier (qvalue=abc123) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; -- assembleoutput; ------------------------------------------------------------------------------- p.getValueByQual = function(frame) local qualID = frame.args.qualID -- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue= local qval = frame.args.qvalue or "" if qval == "" then return "no qualifier value supplied" end local function checkQID(id) return id == qval end return _getvaluebyqual(frame, qualID, checkQID) end ------------------------------------------------------------------------------- -- getValueByLang gets the value of a property which has a qualifier P407 -- ("language of work or name") whose value has the given language code -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the MediaWiki language code to match the language (lang=xx[-yy]) -- (if no code is supplied, it uses the default language) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- p.getValueByLang = function(frame) -- The language code for the qualifier we want to match is in named parameter |lang= local langcode = findLang(frame.args.lang).code local function checkLanguage(id) -- id should represent a language like "British English (Q7979)" -- it should have string property "Wikimedia language code (P424)" -- qlcode will be a table: local qlcode = mw.wikibase.getBestStatements(id, "P424") if (#qlcode > 0) and (qlcode[1].mainsnak.datavalue.value == langcode) then return true end end return _getvaluebyqual(frame, "P407", checkLanguage) end ------------------------------------------------------------------------------- -- getValueByRefSource gets the value of a property which has a reference "stated in" (P248) -- whose value has the given entity-ID. -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the entity ID of a value to match where the reference is stated in (match=Qzzz) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getValueByRefSource = function(frame) -- The property ID that we want to check is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or ""):upper() if propertyID == "" then return "no property supplied" end -- The Q-id of the value we want to match is in named parameter |qvalue= local qval = (frame.args.match or ""):upper() if qval == "" then qval = "Q21540096" end local unit = (frame.args.unit or ""):upper() if unit == "" then unit = "Q4917" end local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local linked = parseParam(frame.args.linked, true) local uabbr = parseParam(frame.args.uabbr or frame.args.unitabbr, false) -- qid not nil means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} local mlt= {} for k1, v1 in ipairs(props) do if onlysrc == false or sourced(v1) then if v1.references then for k2, v2 in ipairs(v1.references) do if v2.snaks.P248 then for k3, v3 in ipairs(v2.snaks.P248) do if v3.datavalue.value.id == qval then out[#out+1], mlt[#out+1] = rendersnak(v1, frame.args, linked, "", "", "", "", uabbr, unit) if not mlt[#out] then -- we only need one match per property value -- unless datatype was monolingual text break end end -- of test for match end -- of loop through values "stated in" end -- of test that "stated in" exists end -- of loop through references end -- of test that references exist end -- of test for sourced end -- of loop through values of propertyID if #mlt > 0 then local langcode = frame.args.lang langcode = mw.text.split( langcode, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( langcode ) table.insert( fbtbl, 1, langcode ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return assembleoutput(out, frame.args, qid, propertyID) else return props -- no property or local parameter supplied end -- of test for success end ------------------------------------------------------------------------------- -- getPropertyIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropertyIDs = function(args) args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( snak.datatype == "wikibase-item" ) and ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, args, qid, pid) end p.getPropertyIDs = function(frame) local args = frame.args return p._getPropertyIDs(args) end ------------------------------------------------------------------------------- -- getQualifierIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It takes a property-id as the first unnamed parameter, and an optional parameter qlist -- which is a list of qualifier property-ids to search for (default is "ALL") -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getQualifierIDs = function(frame) local args = frame.args args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end -- get the other parameters local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qlist = args.qlist or "" if qlist == "" then qlist = "ALL" end qlist = qlist:gsub("[%p%s]+", " ") .. " " local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then if v.qualifiers then for k1, v1 in pairs(v.qualifiers) do if qlist == "ALL " or qlist:match(k1 .. " ") then for i2, v2 in ipairs(v1) do if v2.datatype == "wikibase-item" and v2.snaktype == "value" then out[#out+1] = v2.datavalue.value.id end -- of test that id exists end -- of loop through qualifier values end -- of test for kq in qlist end -- of loop through qualifiers end -- of test for qualifiers end -- of test for rank value, sourced, and value exists if maxvals > 0 and #out >= maxvals then break end end -- of loop through property values return assembleoutput(out, args, qid, pid) end ------------------------------------------------------------------------------- -- getPropOfProp takes two propertyIDs: prop1 and prop2 (as well as the usual parameters) -- If the value(s) of prop1 are of type "wikibase-item" then it returns the value(s) of prop2 -- of each of those wikibase-items. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropOfProp = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code local pid1 = args.prop1 or args.pid1 or "" local pid2 = args.prop2 or args.pid2 or "" if pid1 == "" or pid2 == "" then return nil end local f = {} f.args = args local qid1, statements1 = parseInput(f, args[1], pid1) -- parseInput nulls empty args[1] and returns args[1] if nothing on Wikidata if not qid1 then return statements1 end -- otherwise it returns the qid and a table for the statement local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] then local out2 = propertyvalueandquals(statements2, args, qualID) out[#out+1] = assembleoutput(out2, args, qid2, pid2) end end -- of test for valid property1 value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end p.getPropOfProp = function(frame) local args= frame.args if not args.prop1 and not args.pid1 then args = frame:getParent().args if not args.prop1 and not args.pid1 then return i18n.errors["No property supplied"] end end return p._getPropOfProp(args) end ------------------------------------------------------------------------------- -- getAwardCat takes most of the usual parameters. If the item has values of P166 (award received), -- then it examines each of those awards for P2517 (category for recipients of this award). -- If it exists, it returns the corresponding category, -- with the item's P734 (family name) as sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getAwardCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " local pid1 = args.prop1 or "P166" local pid2 = args.prop2 or "P2517" if pid1 == "" or pid2 == "" then return nil end -- locally supplied value: local localval = mw.text.trim(args[1] or "") local qid1, statements1 = parseInput(frame, localval, pid1) if not qid1 then return localval end -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid1, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] and statements2[1].mainsnak.snaktype == "value" then local qid3 = statements2[1].mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qid3) -- if there's no local sitelink, create the sitelink from English label if not sitelink then local lbl = mw.wikibase.getLabelByLang(qid3, "en") if lbl then if lbl:sub(1,9) == "Category:" then sitelink = mw.text.nowiki(lbl) else sitelink = "Category:" .. mw.text.nowiki(lbl) end end end if sitelink then if sk ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. sitelink .. "]]" end -- of check for sort keys end -- of test for sitelink end -- of test for category end -- of test for wikibase item has a value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end ------------------------------------------------------------------------------- -- getIntersectCat takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented -- It takes two properties, |prop1 and |prop2 (e.g. occupation and country of citizenship) -- Each property's value is a wiki-base entity -- For each value of the first parameter (ranks implemented) it fetches the value's main category -- and then each value of the second parameter (possibly substituting a simpler description) -- then it returns all of the categories representing the intersection of those properties, -- (e.g. Category:Actors from Canada). A joining term may be supplied (e.g. |join=from). -- The item's P734 (family name) is the sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getIntersectCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " args.linked = "no" local pid1 = args.prop1 or "P106" local pid2 = args.prop2 or "P27" if pid1 == "" or pid2 == "" then return nil end local qid, statements1 = parseInput(frame, "", pid1) if not qid then return nil end local qid, statements2 = parseInput(frame, "", pid2) if not qid then return nil end -- topics like countries may have different names in categories from their label in Wikidata local subs_exists, subs = pcall(mw.loadData, "Module:WikidataIB/subs") local join = args.join or "" local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local cat1 = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then -- get the ID representing the value of the property local pvalID = (v.mainsnak.snaktype == "value") and v.mainsnak.datavalue.value.id if pvalID then -- get the topic's main category (P910) for that entity local p910 = mw.wikibase.getBestStatements(pvalID, "P910")[1] if p910 and p910.mainsnak.snaktype == "value" then local tmcID = p910.mainsnak.datavalue.value.id -- use sitelink or the English label for the cat local cat = mw.wikibase.getSitelink(tmcID) if not cat then local lbl = mw.wikibase.getLabelByLang(tmcID, "en") if lbl then if lbl:sub(1,9) == "Category:" then cat = mw.text.nowiki(lbl) else cat = "Category:" .. mw.text.nowiki(lbl) end end end cat1[#cat1+1] = cat end -- of test for topic's main category exists end -- of test for property has vaild value end -- of test for sourced if maxvals > 0 and #cat1 >= maxvals then break end end local cat2 = {} for k, v in ipairs(statements2) do if not onlysrc or sourced(v) then local cat = rendersnak(v, args) if subs[cat] then cat = subs[cat] end cat2[#cat2+1] = cat end if maxvals > 0 and #cat2 >= maxvals then break end end local out = {} for k1, v1 in ipairs(cat1) do for k2, v2 in ipairs(cat2) do if sk ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "]]" end -- of check for sort keys end end args.noicon = "true" return assembleoutput(out, args, qid, pid1) end ------------------------------------------------------------------------------- -- qualsToTable takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- A qid may be given, and the first unnamed parameter is the property ID, which is of type wikibase item. -- It takes a list of qualifier property IDs as |quals= -- For a given qid and property, it creates the rows of an html table, -- each row being a value of the property (optionally only if the property matches the value in |pval= ) -- each cell being the first value of the qualifier corresponding to the list in |quals ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; ------------------------------------------------------------------------------- p.qualsToTable = function(frame) local args = frame.args local quals = args.quals or "" if quals == "" then return "" end args.reqranks = setRanks(args.rank) local propertyID = mw.text.trim(args[1] or "") local f = {} f.args = args local entityid, props = parseInput(f, "", propertyID) if not entityid then return "" end args.langobj = findLang(args.lang) args.lang = args.langobj.code local pval = args.pval or "" local qplist = mw.text.split(quals, "%p") -- split at punctuation and make a sequential table for i, v in ipairs(qplist) do qplist[i] = mw.text.trim(v):upper() -- remove whitespace and capitalise end local col1 = args.firstcol or "" if col1 ~= "" then col1 = col1 .. "</td><td>" end local emptycell = args.emptycell or "&nbsp;" -- construct a 2-D array of qualifier values in qvals local qvals = {} for i, v in ipairs(props) do local skip = false if pval ~= "" then local pid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if pid ~= pval then skip = true end end if not skip then local qval = {} local vqualifiers = v.qualifiers or {} -- go through list of wanted qualifier properties for i1, v1 in ipairs(qplist) do -- check for that property ID in the statement's qualifiers local qv, qtype if vqualifiers[v1] then qtype = vqualifiers[v1][1].datatype if qtype == "time" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) qv = frame:expandTemplate{title="dts", args={qv}} else qv = "?" end elseif qtype == "url" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) local display = mw.ustring.match( mw.uri.decode(qv, "WIKI"), "([%w ]+)$" ) if display then qv = "[" .. qv .. " " .. display .. "]" end end else qv = mw.wikibase.formatValue(vqualifiers[v1][1]) end end -- record either the value or a placeholder qval[i1] = qv or emptycell end -- of loop through list of qualifiers -- add the list of qualifier values as a "row" in the main list qvals[#qvals+1] = qval end end -- of for each value loop local out = {} for i, v in ipairs(qvals) do out[i] = "<tr><td>" .. col1 .. table.concat(qvals[i], "</td><td>") .. "</td></tr>" end return table.concat(out, "\n") end ------------------------------------------------------------------------------- -- getGlobe takes an optional qid of a Wikidata entity passed as |qid= -- otherwise it uses the linked item for the current page. -- If returns the Qid of the globe used in P625 (coordinate location), -- or nil if there isn't one. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getGlobe = function(frame) local qid = frame.args.qid or frame.args[1] or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end local coords = mw.wikibase.getBestStatements(qid, "P625")[1] local globeid if coords and coords.mainsnak.snaktype == "value" then globeid = coords.mainsnak.datavalue.value.globe:match("(Q%d+)") end return globeid end ------------------------------------------------------------------------------- -- getCommonsLink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the linked Wikidata item; -- the Commons sitelink of the topic's main category of the linked Wikidata item; ------------------------------------------------------------------------------- -- Dependencies: _getCommonslink(); _getSitelink(); parseParam() ------------------------------------------------------------------------------- p.getCommonsLink = function(frame) local oc = frame.args.onlycat or frame.args.onlycategories local fb = parseParam(frame.args.fallback or frame.args.fb, true) return _getCommonslink(frame.args.qid, oc, fb) end ------------------------------------------------------------------------------- -- getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getSiteLink = function(frame) return _getSitelink(frame.args.qid, frame.args.wiki or mw.text.trim(frame.args[1] or "")) end ------------------------------------------------------------------------------- -- getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns a link to the article -- with the Wikidata label as the displayed text. -- If there is no sitelink, it returns the label as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLink = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local sitelink = mw.wikibase.getSitelink(itemID) local label = labelOrId(itemID) if sitelink then return "[[:" .. sitelink .. "|" .. label .. "]]" else return label end end ------------------------------------------------------------------------------- -- getLabel has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLabel = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label = labelOrId(itemID, lang) return label end ------------------------------------------------------------------------------- -- label has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- if no qid is supplied, it uses the qid associated with the current page. -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.label = function(frame) local qid = mw.text.trim(frame.args[1] or frame.args.qid or "") if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label, success = labelOrId(qid, lang) if success then return label end end ------------------------------------------------------------------------------- -- getAT (Article Title) -- has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns the sitelink as plain text. -- If there is no sitelink or qid supplied, it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAT = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end return mw.wikibase.getSitelink(itemID) end ------------------------------------------------------------------------------- -- getDescription has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- Any local parameter passed (other than "Wikidata" or "none") becomes the return value. -- It returns the article description for the Wikidata entity if the local parameter is "Wikidata". -- Nothing is returned if the description doesn't exist or "none" is passed as the local parameter. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getDescription = function(frame) local desc = mw.text.trim(frame.args[1] or "") local itemID = mw.text.trim(frame.args.qid or "") if itemID == "" then itemID = nil end if desc:lower() == 'wikidata' then return mw.wikibase.getDescription(itemID) elseif desc:lower() == 'none' then return nil else return desc end end ------------------------------------------------------------------------------- -- getAliases has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- It implements blacklisting and whitelisting with a field name of "alias" by default. -- Any local parameter passed becomes the return value. -- Otherwise it returns the aliases for the Wikidata entity with the usual list options. -- Nothing is returned if the aliases do not exist. ------------------------------------------------------------------------------- -- Dependencies: findLang(); assembleoutput() ------------------------------------------------------------------------------- p.getAliases = function(frame) local args = frame.args local fieldname = args.name or "" if fieldname == "" then fieldname = "alias" end local blacklist = args.suppressfields or args.spf or "" if blacklist:find(fieldname) then return nil end local localval = mw.text.trim(args[1] or "") if localval ~= "" then return localval end local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end if not (whitelist == 'ALL' or whitelist:find(fieldname)) then return nil end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return nil end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return nil end args.langobj = findLang(args.lang) local langcode = args.langobj.code args.lang = langcode local out = {} for k1, v1 in pairs(aliases) do if v1[1].language == langcode then for k1, v2 in ipairs(v1) do out[#out+1] = v2.value end break end end return assembleoutput(out, args, qid) end ------------------------------------------------------------------------------- -- pageId returns the page id (entity ID, Qnnn) of the current page -- returns nothing if the page is not connected to Wikidata ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.pageId = function(frame) return mw.wikibase.getEntityIdForCurrentPage() end ------------------------------------------------------------------------------- -- formatDate is a wrapper to export the private function format_Date ------------------------------------------------------------------------------- -- Dependencies: format_Date(); ------------------------------------------------------------------------------- p.formatDate = function(frame) return format_Date(frame.args[1], frame.args.df, frame.args.bc) end ------------------------------------------------------------------------------- -- location is a wrapper to export the private function _location -- it takes the entity-id as qid or the first unnamed parameter -- optional boolean parameter first toggles the display of the first item -- optional boolean parameter skip toggles the display to skip to the last item -- parameter debug=<y/n> (default 'n') adds error msg if not a location ------------------------------------------------------------------------------- -- Dependencies: _location(); ------------------------------------------------------------------------------- p.location = function(frame) local debug = (frame.args.debug or ""):sub(1, 1):lower() if debug == "" then debug = "n" end local qid = mw.text.trim(frame.args.qid or frame.args[1] or ""):upper() if qid == "" then qid=mw.wikibase.getEntityIdForCurrentPage() end if not qid then if debug ~= "n" then return i18n.errors["entity-not-found"] else return nil end end local first = mw.text.trim(frame.args.first or "") local skip = mw.text.trim(frame.args.skip or "") return table.concat( _location(qid, first, skip), ", " ) end ------------------------------------------------------------------------------- -- checkBlacklist implements a test to check whether a named field is allowed -- returns true if the field is not blacklisted (i.e. allowed) -- returns false if the field is blacklisted (i.e. disallowed) -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "blacklisted" -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "not blacklisted" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkBlacklist = function(frame) local blacklist = frame.args.suppressfields or frame.args.spf or "" local fieldname = frame.args.name or "" if blacklist ~= "" and fieldname ~= "" then if blacklist:find(fieldname) then return false else return true end else -- one of the fields is missing: let's call that "not on the list" return true end end ------------------------------------------------------------------------------- -- emptyor returns nil if its first unnamed argument is just punctuation, whitespace or html tags -- otherwise it returns the argument unchanged (including leading/trailing space). -- If the argument may contain "=", then it must be called explicitly: -- |1=arg -- (In that case, leading and trailing spaces are trimmed) -- It finds use in infoboxes where it can replace tests like: -- {{#if: {{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}} | <span class="xxx">{{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}}</span> | }} -- with a form that uses just a single call to Wikidata: -- {{#invoke |WikidataIB |emptyor |1= <span class="xxx">{{#invoke:WikidataIB |getvalue |P99 |fwd=ALL}}</span> }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.emptyor = function(frame) local s = frame.args[1] or "" if s == "" then return nil end local sx = s:gsub("%s", ""):gsub("<[^>]*>", ""):gsub("%p", "") if sx == "" then return nil else return s end end ------------------------------------------------------------------------------- -- labelorid is a public function to expose the output of labelOrId() -- Pass the Q-number as |qid= or as an unnamed parameter. -- It returns the Wikidata label for that entity or the qid if no label exists. ------------------------------------------------------------------------------- -- Dependencies: labelOrId ------------------------------------------------------------------------------- p.labelorid = function(frame) return (labelOrId(frame.args.qid or frame.args[1])) end ------------------------------------------------------------------------------- -- getLang returns the MediaWiki language code of the current content. -- If optional parameter |style=full, it returns the language name. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLang = function(frame) local style = (frame.args.style or ""):lower() local langcode = mw.language.getContentLanguage().code if style == "full" then return mw.language.fetchLanguageName( langcode ) end return langcode end ------------------------------------------------------------------------------- -- getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: _getItemLangCode() ------------------------------------------------------------------------------- p.getItemLangCode = function(frame) return _getItemLangCode(frame.args.qid or frame.args[1]) end ------------------------------------------------------------------------------- -- findLanguage exports the local findLang() function -- It takes an optional language code and returns, in order of preference: -- the code if a known language; -- the user's language, if set; -- the server's content language. ------------------------------------------------------------------------------- -- Dependencies: findLang ------------------------------------------------------------------------------- p.findLanguage = function(frame) return findLang(frame.args.lang or frame.args[1]).code end ------------------------------------------------------------------------------- -- getQid returns the qid, if supplied -- failing that, the Wikidata entity ID of the "category's main topic (P301)", if it exists -- failing that, the Wikidata entity ID associated with the current page, if it exists -- otherwise, nothing ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getQid = function(frame) local qid = (frame.args.qid or ""):upper() -- check if a qid was passed; if so, return it: if qid ~= "" then return qid end -- check if there's a "category's main topic (P301)": qid = mw.wikibase.getEntityIdForCurrentPage() if qid then local prop301 = mw.wikibase.getBestStatements(qid, "P301") if prop301[1] then local mctid = prop301[1].mainsnak.datavalue.value.id if mctid then return mctid end end end -- otherwise return the page qid (if any) return qid end ------------------------------------------------------------------------------- -- followQid takes four optional parameters: qid, props, list and all. -- If qid is not given, it uses the qid for the connected page -- or returns nil if there isn't one. -- props is a list of properties, separated by punctuation. -- If props is given, the Wikidata item for the qid is examined for each property in turn. -- If that property contains a value that is another Wikibase-item, that item's qid is returned, -- and the search terminates, unless |all=y when all of the qids are returned, separated by spaces. -- If |list= is set to a template, the qids are passed as arguments to the template. -- If props is not given, the qid is returned. ------------------------------------------------------------------------------- -- Dependencies: parseParam() ------------------------------------------------------------------------------- p._followQid = function(args) local qid = (args.qid or ""):upper() local all = parseParam(args.all, false) local list = args.list or "" if list == "" then list = nil end if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local out = {} local props = (args.props or ""):upper() if props ~= "" then for p in mw.text.gsplit(props, "%p") do -- split at punctuation and iterate p = mw.text.trim(p) for i, v in ipairs( mw.wikibase.getBestStatements(qid, p) ) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end -- test for all or just the first one found end -- test for value exists for that property end -- loop through values of property to follow end -- loop through list of properties to follow end if #out > 0 then local ret = "" if list then ret = mw.getCurrentFrame():expandTemplate{title = list, args = out} else ret = table.concat(out, " ") end return ret else return qid end end p.followQid = function(frame) return p._followQid(frame.args) end ------------------------------------------------------------------------------- -- globalSiteID returns the globalSiteID for the current wiki -- e.g. returns "enwiki" for the English Wikipedia, "enwikisource" for English Wikisource, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.globalSiteID = function(frame) return mw.wikibase.getGlobalSiteId() end ------------------------------------------------------------------------------- -- siteID returns the root of the globalSiteID -- e.g. "en" for "enwiki", "enwikisource", etc. -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.siteID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be_x_old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- projID returns the code used to link to the reader's language's project -- e.g "en" for [[:en:WikidataIB]] -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.projID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be-x-old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- formatNumber formats a number according to the the supplied language code ("|lang=") -- or the default language if not supplied. -- The number is the first unnamed parameter or "|num=" ------------------------------------------------------------------------------- -- Dependencies: findLang() ------------------------------------------------------------------------------- p.formatNumber = function(frame) local lang local num = tonumber(frame.args[1] or frame.args.num) or 0 lang = findLang(frame.args.lang) return lang:formatNum( num ) end ------------------------------------------------------------------------------- -- examine dumps the property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' (or the other unnamed parameter) -- or from the item corresponding to the current page if qid is not supplied. -- e.g. {{#invoke:WikidataIB |examine |pid=P26 |qid=Q42}} -- or {{#invoke:WikidataIB |examine |P26 |Q42}} or any combination of these -- or {{#invoke:WikidataIB |examine |P26}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.examine = function( frame ) local args if frame.args[1] or frame.args.pid or frame.args.qid then args = frame.args else args = frame:getParent().args end local par = {} local pid = (args.pid or ""):upper() local qid = (args.qid or ""):upper() par[1] = mw.text.trim( args[1] or "" ):upper() par[2] = mw.text.trim( args[2] or "" ):upper() table.sort(par) if par[2]:sub(1,1) == "P" then par[1], par[2] = par[2], par[1] end if pid == "" then pid = par[1] end if qid == "" then qid = par[2] end local q1 = qid:sub(1,1) if pid:sub(1,1) ~= "P" then return "No property supplied" end if q1 ~= "Q" and q1 ~= "M" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return "No item for this page" end return "<pre>" .. mw.dumpObject( mw.wikibase.getAllStatements( qid, pid ) ) .. "</pre>" end ------------------------------------------------------------------------------- -- checkvalue looks for 'val' as a wikibase-item value of a property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' -- or from the Wikidata item associated with the current page if qid is not supplied. -- It only checks ranks that are requested (preferred and normal by default) -- If property is not supplied, then P31 (instance of) is assumed. -- It returns val if found or nothing if not found. -- e.g. {{#invoke:WikidataIB |checkvalue |val=Q5 |pid=P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkvalue = function( frame ) local args if frame.args.val then args = frame.args else args = frame:getParent().args end local val = args.val if not val then return nil end local pid = mw.text.trim(args.pid or args[1] or "P31"):upper() local qid = (args.qid or ""):upper() if pid:sub(1,1) ~= "P" then return nil end if qid:sub(1,1) ~= "Q" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local ranks = setRanks(args.rank) local stats = {} if ranks.b then stats = mw.wikibase.getBestStatements(qid, pid) else stats = mw.wikibase.getAllStatements( qid, pid ) end if not stats[1] then return nil end if stats[1].mainsnak.datatype == "wikibase-item" then for k, v in pairs( stats ) do local ms = v.mainsnak if ranks[v.rank:sub(1,1)] and ms.snaktype == "value" and ms.datavalue.value.id == val then return val end end end return nil end ------------------------------------------------------------------------------- -- url2 takes a parameter url= that is a proper url and formats it for use in an infobox. -- If no parameter is supplied, it returns nothing. -- This is the equivalent of Template:URL -- but it keeps the "edit at Wikidata" pen icon out of the microformat. -- Usually it will take its url parameter directly from a Wikidata call: -- e.g. {{#invoke:WikidataIB |url2 |url={{wdib |P856 |qid=Q23317 |fwd=ALL |osd=no}} }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.url2 = function(frame) local txt = frame.args.url or "" if txt == "" then return nil end -- extract any icon local url, icon = txt:match("(.+)&nbsp;(.+)") -- make sure there's at least a space at the end url = (url or txt) .. " " icon = icon or "" -- extract any protocol like https:// local prot = url:match("(https*://).+[ \"\']") -- extract address local addr = "" if prot then addr = url:match("https*://(.+)[ \"\']") or " " else prot = "//" addr = url:match("[^%p%s]+%.(.+)[ \"\']") or " " end -- strip trailing / from end of domain-only url and add <wbr/> before . and / local disp, n = addr:gsub( "^([^/]+)/$", "%1" ):gsub("%/", "<wbr/>/"):gsub("%.", "<wbr/>.") return '<span class="url">[' .. prot .. addr .. " " .. disp .. "]</span>&nbsp;" .. icon end ------------------------------------------------------------------------------- -- getWebsite fetches the Official website (P856) and formats it for use in an infobox. -- This is similar to Template:Official website but with a url displayed, -- and it adds the "edit at Wikidata" pen icon beyond the microformat if enabled. -- A local value will override the Wikidata value. "NONE" returns nothing. -- e.g. {{#invoke:WikidataIB |getWebsite |qid= |noicon= |lang= |url= }} ------------------------------------------------------------------------------- -- Dependencies: findLang(); parseParam(); ------------------------------------------------------------------------------- p.getWebsite = function(frame) local url = frame.args.url or "" if url:upper() == "NONE" then return nil end local urls = {} local quals = {} local qid = frame.args.qid or "" if url and url ~= "" then urls[1] = url else if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local prop856 = mw.wikibase.getBestStatements(qid, "P856") for k, v in pairs(prop856) do if v.mainsnak.snaktype == "value" then urls[#urls+1] = v.mainsnak.datavalue.value if v.qualifiers and v.qualifiers["P1065"] then -- just take the first archive url (P1065) local au = v.qualifiers["P1065"][1] if au.snaktype == "value" then quals[#urls] = au.datavalue.value end -- test for archive url having a value end -- test for qualifers end -- test for website having a value end -- loop through website(s) end if #urls == 0 then return nil end local out = {} for i, u in ipairs(urls) do local link = quals[i] or u local prot, addr = u:match("(http[s]*://)(.+)") addr = addr or u local disp, n = addr:gsub("%.", "<wbr/>%.") out[#out+1] = '<span class="url">[' .. link .. " " .. disp .. "]</span>" end local langcode = findLang(frame.args.lang).code local noicon = parseParam(frame.args.noicon, false) if url == "" and not noicon then out[#out] = out[#out] .. createicon(langcode, qid, "P856") end local ret = "" if #out > 1 then ret = mw.getCurrentFrame():expandTemplate{title = "ubl", args = out} else ret = out[1] end return ret end ------------------------------------------------------------------------------- -- getAllLabels fetches the set of labels and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllLabels = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local labels = mw.wikibase.getEntity(qid).labels if not labels then return i18n["labels-not-found"] end local out = {} for k, v in pairs(labels) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllDescriptions fetches the set of descriptions and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllDescriptions = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local descriptions = mw.wikibase.getEntity(qid).descriptions if not descriptions then return i18n["descriptions-not-found"] end local out = {} for k, v in pairs(descriptions) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllAliases fetches the set of aliases and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllAliases = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return i18n["aliases-not-found"] end local out = {} for k1, v1 in pairs(aliases) do local lang = v1[1].language local val = {} for k1, v2 in ipairs(v1) do val[#val+1] = v2.value end out[#out+1] = table.concat(val, ", ") .. " (" .. lang .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- showNoLinks displays the article titles that should not be linked. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.showNoLinks = function(frame) local out = {} for k, v in pairs(donotlink) do out[#out+1] = k end table.sort( out ) return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- checkValidity checks whether the first unnamed parameter represents a valid entity-id, -- that is, something like Q1235 or P123. -- It returns the strings "true" or "false". -- Change false to nil to return "true" or "" (easier to test with #if:). ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- function p.checkValidity(frame) local id = mw.text.trim(frame.args[1] or "") if mw.wikibase.isValidEntityId(id) then return true else return false end end ------------------------------------------------------------------------------- -- getEntityFromTitle returns the Entity-ID (Q-number) for a given title. -- Modification of Module:ResolveEntityId -- The title is the first unnamed parameter. -- The site parameter determines the site/language for the title. Defaults to current wiki. -- The showdab parameter determines whether dab pages should return the Q-number or nil. Defaults to true. -- Returns the Q-number or nil if it does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam ------------------------------------------------------------------------------- function p.getEntityFromTitle(frame) local args=frame.args if not args[1] then args=frame:getParent().args end if not args[1] then return nil end local title = mw.text.trim(args[1]) local site = args.site or "" local showdab = parseParam(args.showdab, true) local qid = mw.wikibase.getEntityIdForTitle(title, site) if qid then local prop31 = mw.wikibase.getBestStatements(qid, "P31")[1] if not showdab and prop31 and prop31.mainsnak.datavalue.value.id == "Q4167410" then return nil else return qid end end end ------------------------------------------------------------------------------- -- getDatePrecision returns the number representing the precision of the first best date value -- for the given property. -- It takes the qid and property ID -- The meanings are given at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times -- 0 = 1 billion years .. 6 = millennium, 7 = century, 8 = decade, 9 = year, 10 = month, 11 = day -- Returns 0 (or the second unnamed parameter) if the Wikidata does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam; sourced; ------------------------------------------------------------------------------- function p.getDatePrecision(frame) local args=frame.args if not args[1] then args=frame:getParent().args end local default = tonumber(args[2] or args.default) or 0 local prop = mw.text.trim(args[1] or "") if prop == "" then return default end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return default end local onlysrc = parseParam(args.onlysourced or args.osd, true) local stat = mw.wikibase.getBestStatements(qid, prop) for i, v in ipairs(stat) do local prec = (onlysrc == false or sourced(v)) and v.mainsnak.datavalue and v.mainsnak.datavalue.value and v.mainsnak.datavalue.value.precision if prec then return prec end end return default end return p ------------------------------------------------------------------------------- -- List of exported functions ------------------------------------------------------------------------------- --[[ _getValue getValue getPreferredValue getCoords getQualifierValue getSumOfParts getValueByQual getValueByLang getValueByRefSource getPropertyIDs getQualifierIDs getPropOfProp getAwardCat getIntersectCat getGlobe getCommonsLink getSiteLink getLink getLabel label getAT getDescription getAliases pageId formatDate location checkBlacklist emptyor labelorid getLang getItemLangCode findLanguage getQID followQid globalSiteID siteID projID formatNumber examine checkvalue url2 getWebsite getAllLabels getAllDescriptions getAllAliases showNoLinks checkValidity getEntityFromTitle getDatePrecision --]] ------------------------------------------------------------------------------- cdfad4f2433151e512d5023478c35bceaf5c980a Module:WikidataIB/nolinks 828 71 116 2024-05-12T08:30:13Z NoKiAthami 2 Created page with "local p ={} --[[ The values here are the English sitelinks for items that should not be linked. These 36 are not definitive and may be altered to suit. --]] p.items = { "Australia", "Austria", "Belgium", "Canada", "China", "Denmark", "England", "France", "Germany", "Greece", "Hungary", "Iceland", "India", "Republic of Ireland", "Israel", "Italy", "Jamaica", "Japan", "Luxembourg", "Mexico", "Netherlands", "New Zealand", "Northern Ireland", "Norway..." Scribunto text/plain local p ={} --[[ The values here are the English sitelinks for items that should not be linked. These 36 are not definitive and may be altered to suit. --]] p.items = { "Australia", "Austria", "Belgium", "Canada", "China", "Denmark", "England", "France", "Germany", "Greece", "Hungary", "Iceland", "India", "Republic of Ireland", "Israel", "Italy", "Jamaica", "Japan", "Luxembourg", "Mexico", "Netherlands", "New Zealand", "Northern Ireland", "Norway", "Poland", "Portugal", "Russia", "Scotland", "South Africa", "Spain", "Sweden", "Switzerland", "Turkey", "United Kingdom", "UK", "United States", "USA", "Wales", } --[[ This provides a convenient way to create a test whether an item is on the list. --]] p.itemsindex = {} for i, v in ipairs(p.items) do p.itemsindex[v] = true end return p d42a1e1cb5d411ab1b578dc0d36aa0266f32b2d6 Module:WikidataIB/titleformats 828 72 117 2024-05-12T08:30:46Z NoKiAthami 2 Created page with "--[[ To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. This submodule lists the entity-ids used in 'instance of' (P31), which allows a module to identify the values that should be formatted. The table p.formats is indexed by entity-id, and contains the value " or '' --]] local p = {} p.italics = { "Q571", -- book "Q13593966", -- literary trilogy "Q277759", -- book series "Q2188189", -- musical work "Q114..." Scribunto text/plain --[[ To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. This submodule lists the entity-ids used in 'instance of' (P31), which allows a module to identify the values that should be formatted. The table p.formats is indexed by entity-id, and contains the value " or '' --]] local p = {} p.italics = { "Q571", -- book "Q13593966", -- literary trilogy "Q277759", -- book series "Q2188189", -- musical work "Q11424", -- film "Q13593818", -- film trilogy "Q24856", -- film series "Q5398426", -- television series "Q482994", -- album "Q169930", -- extended play "Q1760610", -- comic book "Q7889", -- video game "Q7058673", -- video game series "Q25379", -- play "Q2743", -- musical "Q37484", -- epic poem "Q41298", -- magazine } p.quotes = { "Q207628", -- musical composition } p.size = 0 p.formats = {} for i, v in ipairs(p.italics) do p.formats[v] = "''" p.size = p.size + 1 end for i, v in ipairs(p.quotes) do p.formats[v] = '"' p.size = p.size + 1 end return p aecc52ff69e56d315f5b60dc21d02dd94a63dfea Template:Module other 10 73 118 2024-05-12T08:35:29Z NoKiAthami 2 Created page with "{{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Module}} | module | other }} }} | module = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude>" wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Module}} | module | other }} }} | module = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 503694836c1b07142e63fd35d8be69ec8bb9ffe7 Template:Ombox 10 74 119 2024-05-12T08:36:11Z NoKiAthami 2 Created page with "{{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0e54065432d540737b9e56c4e3a8e7f74d4534ea Template:Module rating 10 75 120 2024-05-12T08:37:07Z NoKiAthami 2 Created page with "<includeonly>{{#ifeq:{{SUBPAGENAME}}|doc|<!--do not show protection level of the module on the doc page, use the second and optionally third parameter if the doc page is also protected -->{{#if:{{{2|}}}|{{Pp|{{{2}}}|action={{{3|}}}}}}}|{{Module other|{{ombox | type = notice | image = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = [[File:Ambox warning blue construction.svg|40x40px|link=|alt=Pre-alpha]] | alpha | a = File:Greek lc alph..." wikitext text/x-wiki <includeonly>{{#ifeq:{{SUBPAGENAME}}|doc|<!--do not show protection level of the module on the doc page, use the second and optionally third parameter if the doc page is also protected -->{{#if:{{{2|}}}|{{Pp|{{{2}}}|action={{{3|}}}}}}}|{{Module other|{{ombox | type = notice | image = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = [[File:Ambox warning blue construction.svg|40x40px|link=|alt=Pre-alpha]] | alpha | a = [[File:Greek lc alpha icon.svg|26x26px|link=|alt=Alpha]] | beta | b = [[File:Greek lc beta icon.svg|40x40px|link=|alt=Beta]] | release | r | general | g = [[File:Green check.svg|40x40px|link=|alt=Ready for use]] | protected | protect | p = [[File:{{#switch:{{#invoke:Effective protection level|edit|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{FULLBASEPAGENAME}}|{{FULLPAGENAME}}}}}}|autoconfirmed=Semi|extendedconfirmed=Extended|accountcreator|templateeditor=Template|#default=Full}}-protection-shackle.svg|40x40px|link=|alt=Protected]] | semiprotected | semiprotect | semi =[[File:Semi-protection-shackle.svg|40x40px|link=|alt=Semi-protected]] }} | style = | textstyle = | text = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = This module is rated as [[:Category:Modules in pre-alpha development|pre-alpha]]. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure. | alpha | a = This module is rated as [[:Category:Modules in alpha|alpha]]. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome. | beta | b = This module is rated as [[:Category:Modules in beta|beta]], and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected. | release | r | general | g = This module is rated as [[:Category:Modules for general use|ready for general use]]. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by [[Wikipedia:Template sandbox and test cases|sandbox testing]] rather than repeated trial-and-error editing. | protected | protect | p = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[Wikipedia:Protection policy|protected]] from editing. | semiprotected | semiprotect | semi = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[WP:SEMI|semi-protected]] from editing. | #default = {{error|Module rating is invalid or not specified.}} }} }}<!-- -->{{#ifeq: {{ROOTPAGENAME}} | Sandbox | <!-- No category for user sandboxes --> | {{#switch: {{SUBPAGENAME}} | doc | sandbox =<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = [[Category:Modules in pre-alpha development|{{PAGENAME}}]] | alpha | a = [[Category:Modules in alpha|{{PAGENAME}}]] | beta | b = [[Category:Modules in beta|{{PAGENAME}}]] | release | r | general | g = [[Category:Modules for general use|{{PAGENAME}}]] | protected | protect | p = [[Category:Modules subject to page protection|{{PAGENAME}}]] | semiprotected | semiprotect | semi = [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} }} }}<!-- -->|{{error|Error: {{tl|Module rating}} must be placed in the Module namespace.}} [[Category:Pages with templates in the wrong namespace]]|demospace={{{demospace|<noinclude>module</noinclude>}}}}}}}<!-- --></includeonly><noinclude> {{module rating|release|nocat=true|demospace=module}} {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 75c928c417eb4da2a338898531fd8d501e05adbb Template:Commons category 10 76 121 2024-05-12T08:42:48Z NoKiAthami 2 Created page with "{{Sister project | position = {{{position|}}} | project = commons | text = Wikimedia Commons has {{{alt-term|media related to}}} <span style="font-weight: bold; {{#ifeq:{{{nowrap|no}}}|yes|white-space:nowrap;}} {{#ifeq:{{{italic|yes}}}|yes|font-style: italic;}}">commons:{{#if:{{{1|}}}|Category:{{{1|}}}|{{if then show|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:{{PAGENAME}}}}}}|{{#ifeq:{{{lcf|{{{lcfirst|no}}}}}}|yes|{{..." wikitext text/x-wiki {{Sister project | position = {{{position|}}} | project = commons | text = Wikimedia Commons has {{{alt-term|media related to}}} <span style="font-weight: bold; {{#ifeq:{{{nowrap|no}}}|yes|white-space:nowrap;}} {{#ifeq:{{{italic|yes}}}|yes|font-style: italic;}}">[[commons:{{#if:{{{1|}}}|Category:{{{1|}}}|{{if then show|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:{{PAGENAME}}}}}}|{{#ifeq:{{{lcf|{{{lcfirst|no}}}}}}|yes|{{lcfirst:{{{2|{{#if:{{{1|}}} | {{{1|}}} <!-- -->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:|}}<!-- --> |{{PAGENAME}} }} }} }}} }}<!-- -->|{{{2|{{#if:{{{1|}}} | {{{1|}}} <!-- -->|{{if then show|{{#invoke:String|replace|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|Category:|}}|{{PAGENAME}} }}<!-- -->}}}}}}}]]</span>.<!-- End of the template code, now add relevant tracking categories --><includeonly>{{#switch:{{NAMESPACE}}||{{ns:14}}=<!-- Only add tracking categories to articles and categories. -->{{#if:{{{1|}}}|{{#ifeq:Category:{{replace|{{{1|}}}|_|&#32;}}|{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!-- -->[[Category:Commons category link is on Wikidata]]<!-- -->|{{#ifeq:{{replace|{{{1|}}}|_|&#32;}}|{{PAGENAME}}|<!-- ... the local parameter is the same as the local pagename -->[[Category:Commons category link is defined as the pagename]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}<!-- ... the local parameter is not the pagename -->|[[Category:Commons category link is locally defined]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}}}} }}<!-- We don't have a locally-defined link -->|{{#if:{{#invoke:WikidataIB |getCommonsLink|qid={{{qid|}}}|onlycat=True|fallback=False}}|<!-- ... so we're using Wikidata -->[[Category:Commons category link from Wikidata]]<!-- <!-- ... or we're using the pagename -->|[[Category:Commons category link is the pagename]]{{preview warning|Commons category does not match the Commons sitelink on Wikidata – [[Template:Commons_category#Resolving_discrepancies|please check]]}} }} }} }}</includeonly> }}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 2bd43ed87c200ce6b7fb2125ada22b7e359dcee4 Template:Preview warning 10 77 122 2024-05-12T08:44:28Z NoKiAthami 2 Created page with "<includeonly>{{#invoke:If preview|pwarning}}</includeonly><noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki <includeonly>{{#invoke:If preview|pwarning}}</includeonly><noinclude> {{documentation}} </noinclude> cce22240e54b49011c0f21b61215790188021347 Module:If preview 828 78 123 2024-05-12T08:45:19Z NoKiAthami 2 Created page with "local p = {} local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) if cfg.preview then return frame.args[1] or '' else return frame.args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template usi..." Scribunto text/plain local p = {} local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) if cfg.preview then return frame.args[1] or '' else return frame.args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template using this module), depending on whether it is being previewed. ]] function p.pmain(frame) return p.main(frame:getParent()) end local function warning_text(warning) return mw.ustring.format( cfg.warning_infrastructure, cfg.templatestyles, warning ) end function p._warning(args) local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or '' if warning == '' then return warning_text(cfg.missing_warning) end if not cfg.preview then return '' end return warning_text(warning) end --[[ warning This function returns a "preview warning", which is the first argument marked up with HTML and some supporting text, depending on whether the page is being previewed. disabled since we'll implement the template version in general ]] --function p.warning(frame) -- return p._warning(frame.args) --end --[[ warning, but for pass-through templates like {{preview warning}} ]] function p.pwarning(frame) return p._warning(frame:getParent().args) end return p 9a92196d0001b8016f2501aedfadcc3adcb974ef Module:If preview/configuration 828 79 124 2024-05-12T08:46:52Z NoKiAthami 2 Created page with " --[[ We perform the actual check for whether this is a preview here since preprocessing is relatively expensive. ]] local frame = mw.getCurrentFrame() local function is_preview() local revision_id = frame:preprocess('{{REVISIONID}}') -- {{REVISIONID}} is usually the empty string when previewed. -- I don't know why we're checking for nil but hey, maybe someday things -- would have broken return revision_id == nil or revision_id == '' end local function templatesty..." Scribunto text/plain --[[ We perform the actual check for whether this is a preview here since preprocessing is relatively expensive. ]] local frame = mw.getCurrentFrame() local function is_preview() local revision_id = frame:preprocess('{{REVISIONID}}') -- {{REVISIONID}} is usually the empty string when previewed. -- I don't know why we're checking for nil but hey, maybe someday things -- would have broken return revision_id == nil or revision_id == '' end local function templatestyles() return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:If preview/styles.css' } } end return { preview = is_preview(), templatestyles = templatestyles(), warning_infrastructure = '%s<div class="preview-warning"><strong>Preview warning:</strong> %s</div>', missing_warning = 'The template has no warning text. Please add a warning.' } a8a356ec77ef10428b6ab1ebeb1bfb055f0f98b6 Module:If preview/styles.css 828 80 125 2024-05-12T08:47:22Z NoKiAthami 2 Created page with "/* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: red; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .preview-warning + link + .preview-warning { margin-top: -0.5em; }" sanitized-css text/css /* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: red; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .preview-warning + link + .preview-warning { margin-top: -0.5em; } 8b79ffc4853d424a805b084de00030e04bbd573e Module:Message box/cmbox.css 828 81 126 2024-05-12T08:50:03Z NoKiAthami 2 Created page with "/* {{pp|small=y}} */ .cmbox { margin: 3px 0; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; } .cmbox-speedy { border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } .cmbox-delete { background-color: #ffdbdb; /* Pink */ } .cmbox-content { background-color: #ffe7ce; /* Orange */ } .cmbox-style { background-color: #fff9db; /* Yellow */..." sanitized-css text/css /* {{pp|small=y}} */ .cmbox { margin: 3px 0; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; } .cmbox-speedy { border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } .cmbox-delete { background-color: #ffdbdb; /* Pink */ } .cmbox-content { background-color: #ffe7ce; /* Orange */ } .cmbox-style { background-color: #fff9db; /* Yellow */ } .cmbox-move { background-color: #e4d8ff; /* Purple */ } .cmbox-protection { background-color: #efefe1; /* Gray-gold */ } .cmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .cmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .cmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .cmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .cmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .cmbox { margin: 3px 10%; } } 95109477b86803acfea977ae0bce2319e72f170d Template:Cmbox 10 82 127 2024-05-12T08:50:11Z NoKiAthami 2 Created page with "{{#invoke:Message box|cmbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki {{#invoke:Message box|cmbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 18d654cb0dbc293e070a3e2aa97cb88f1791a273 Template:Topic category 10 83 128 2024-05-12T08:50:34Z NoKiAthami 2 Created page with "{{Cmbox | type = notice | text = This is a '''[[WP:TOPICCAT|topic category]]'''{{#if:{{{1|}}}|&#32;for the topic [[{{{1}}}]]{{nodisplay|{{Cat main|{{{1}}}}}}}|}}. }}<noinclude>{{Documentation}}</noinclude>" wikitext text/x-wiki {{Cmbox | type = notice | text = This is a '''[[WP:TOPICCAT|topic category]]'''{{#if:{{{1|}}}|&#32;for the topic [[{{{1}}}]]{{nodisplay|{{Cat main|{{{1}}}}}}}|}}. }}<noinclude>{{Documentation}}</noinclude> e91657d9e3e1862d6326ec919baf265661b41666 Template:Nodisplay 10 84 129 2024-05-12T08:52:21Z NoKiAthami 2 Created page with "<div class="display-none" style="display:inline;display:none;">{{{1}}}</div><noinclude>{{Documentation}}</noinclude>" wikitext text/x-wiki <div class="display-none" style="display:inline;display:none;">{{{1}}}</div><noinclude>{{Documentation}}</noinclude> fa56c4da1e3f4ee8635c7e30d94aa3c9acecb517 Module:Category main article 828 85 130 2024-05-12T08:53:31Z NoKiAthami 2 Created page with "-- This module implements {{cat main}}. local mHatnote = require('Module:Hatnote') local mFormatLink = require('Module:Format link') local yesno = require('Module:Yesno') local mTableTools -- lazily initialise local mArguments -- lazily initialise local p = {} function p.catMain(frame) mTableTools = require('Module:TableTools') mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame, {wrappers = 'Template:Category main article'}) local pages..." Scribunto text/plain -- This module implements {{cat main}}. local mHatnote = require('Module:Hatnote') local mFormatLink = require('Module:Format link') local yesno = require('Module:Yesno') local mTableTools -- lazily initialise local mArguments -- lazily initialise local p = {} function p.catMain(frame) mTableTools = require('Module:TableTools') mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame, {wrappers = 'Template:Category main article'}) local pages = mTableTools.compressSparseArray(args) local options = { article = args.article, selfref = args.selfref } return p._catMain(options, unpack(pages)) end function p._catMain(options, ...) options = options or {} -- Get the links table. local links = mFormatLink.formatPages({}, {...}) if not links[1] then local page = mw.title.getCurrentTitle().text links[1] = mFormatLink._formatLink{link = page} end for i, link in ipairs(links) do links[i] = string.format("'''%s'''", link) end -- Get the pagetype. local pages = {...} local pagetype if options.article ~= nil then pagetype = yesno(options.article) ~= false and 'article' or 'page' elseif pages and pages[1] then local page = pages[1]:gsub("|.*","") pagetype = mw.title.new(page).namespace == 0 and "article" or "page" else pagetype = "article" end -- Work out whether we need to be singular or plural. local stringToFormat if #links > 1 then stringToFormat = 'The main %ss for this [[Help:Categories|category]] are %s.' else stringToFormat = 'The main %s for this [[Help:Categories|category]] is %s.' end -- Get the text. local text = string.format( stringToFormat, pagetype, mw.text.listToText(links) ) -- Pass it through to Module:Hatnote. local hnOptions = {} hnOptions.selfref = options.selfref return mHatnote._hatnote(text, hnOptions) end return p c9ff1251c350e2726303c7bf9568d61ed54b3881 Module:Format link 828 86 131 2024-05-12T08:54:09Z NoKiAthami 2 Created page with "-------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require(..." Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f Module:TableTools 828 87 132 2024-05-12T08:55:01Z NoKiAthami 2 Created page with "------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke...." Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v elseif not exists[v] then ret[#ret + 1] = v exists[v] = true end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) if type(orig) ~= "table" then return orig end -- already_seen stores copies of tables indexed by the original table. local copy = already_seen[orig] if copy ~= nil then return copy end copy = {} already_seen[orig] = copy -- memoize before any recursion, to avoid infinite loops for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then setmetatable(copy, _deepCopy(mt, true, already_seen)) end end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen or {}) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end ------------------------------------------------------------------------------------ -- merge -- -- Given the arrays, returns an array containing the elements of each input array -- in sequence. ------------------------------------------------------------------------------------ function p.merge(...) local arrays = {...} local ret = {} for i, arr in ipairs(arrays) do checkType('merge', i, arr, 'table') for _, v in ipairs(arr) do ret[#ret + 1] = v end end return ret end ------------------------------------------------------------------------------------ -- extend -- -- Extends the first array in place by appending all elements from the second -- array. ------------------------------------------------------------------------------------ function p.extend(arr1, arr2) checkType('extend', 1, arr1, 'table') checkType('extend', 2, arr2, 'table') for _, v in ipairs(arr2) do arr1[#arr1 + 1] = v end end return p d2b5fb8ccd1613665d6a014fbb949e07775befee Template:Cat main 10 88 133 2024-05-12T08:55:30Z NoKiAthami 2 Created page with "{{#invoke:Category main article|catMain}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki {{#invoke:Category main article|catMain}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 4dfdce08b683ad60aa1cd81362d9c6c397877585 Category:Mangalia 14 89 134 2024-05-12T08:57:46Z NoKiAthami 2 Created page with "{{Commons category}} {{Topic category|Mangalia}}" wikitext text/x-wiki {{Commons category}} {{Topic category|Mangalia}} d3267d9b897e4c3ff0513817293e1f240e51ed9e 138 134 2024-05-12T09:10:48Z NoKiAthami 2 wikitext text/x-wiki {{Commons category}} {{Topic category|Mangalia}} [[Category: Mangalitia]] 0a8d263c798d6733894a3115d4440a40c98f0a52 Category:Mangalitia 14 90 135 2024-05-12T08:59:05Z NoKiAthami 2 Created page with "{{Commons category}} {{Topic category|Mangalitia}}" wikitext text/x-wiki {{Commons category}} {{Topic category|Mangalitia}} 3185e83ae9fa54db27d1408ffba62f062e5521fe 136 135 2024-05-12T09:08:21Z NoKiAthami 2 wikitext text/x-wiki {{Commons category}} {{Topic category|Mangalitia}} [[Category:Mangalia]] 9b2ba516598f7e43b73d36a04b4647e4e0dfdffc 137 136 2024-05-12T09:10:25Z NoKiAthami 2 wikitext text/x-wiki {{Commons category}} {{Topic category|Mangalitia}} 3185e83ae9fa54db27d1408ffba62f062e5521fe Category:Laoamia 14 91 139 2024-05-12T09:12:08Z NoKiAthami 2 Created page with "{{Commons category}} {{Topic category|Laoamia}} [[Category:Mangalitia]]" wikitext text/x-wiki {{Commons category}} {{Topic category|Laoamia}} [[Category:Mangalitia]] 5487796583a6ae869c93667dc37ed2429906d9c2 Category:Mangalese Language 14 92 140 2024-05-12T09:14:29Z NoKiAthami 2 Created page with "{{Commons category}} {{Topic category|Mangalese_Language}} [[Category:Mangalia]] [[Category:Mangalitia]]" wikitext text/x-wiki {{Commons category}} {{Topic category|Mangalese_Language}} [[Category:Mangalia]] [[Category:Mangalitia]] d60bcd509428bed7697e34d15e86d18886b647c1 141 140 2024-05-12T09:14:56Z NoKiAthami 2 wikitext text/x-wiki {{Commons category}} {{Topic category|Mangalese_Language}} [[Category:Mangalia]] b53abd02114aa881f083d7963adb64ca947fdcd0 Mangalia 0 5 142 83 2024-05-12T10:24:53Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Northern region |- ! Provinces !! Capitals !! Blasons |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |} {| class="wikitable" |+ Central region |- ! Provinces !! Capitals !! Blasons |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |} {| class="wikitable" |+ Southern region |- ! Provinces !! Capitals !! Blasons |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} [[Category: Mangalitia]] [[Category: Mangalia]] 744e55fe242652112895b1e0e76378a1e33cf8fd Mangalese Language 0 7 143 89 2024-05-12T10:25:45Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Mangalemang'' |image = [[File:Mangalemang.svg|thumb]] |native = [[File:Mangalia_Flag.png|20px|frameless]] [[Mangalia]] |ethnicity = [[mangalese]], [[Mauri karaka]] |family = [[Mangalic Language Family|Mangalic]] |earlyforms = [[Proto-Mangalic]] * Eastern-Mangalic ** [[Ancient Mangalese]] *** '''Mangalese''' |dialects = * [[Mangalese northern dialects]] ** [[Piapao dialect]] * [[Mangalese central dialects]] ** [[Uraxaalaparang dialect]] * [[Mangalese southern dialects]] ** [[Jalapo dialects]] *** [[Tsinaa dialect]] * [[Insular polyphyletic dialects]] ** [[Mawiaikanian dialects]] |signlang = [[Mangalese military sign language]] |official = [[Mangalia]] (de facto) |minority = [https://en.wikipedia.org/wiki/New_Zealand New Zealand] |regulated = Mangalese corpus, [[Wailamang|Wailamang]] }} The '''Mangalese language''' is the main language of the mangalese people, spoken mainly in [[Mangalia|Mangalia]]. 92a3f9d330bf69423131e80a71bd1ebc4231dc96 Template:Infobox war faction 10 93 144 2024-05-12T10:35:21Z NoKiAthami 2 Created page with "<infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <data source="dates"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="leader"> <label>Leader</label> </data> <data source="ideology"/> <label>Ideology</label> </data> </infobox>" wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <data source="dates"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="leader"> <label>Leader</label> </data> <data source="ideology"/> <label>Ideology</label> </data> </infobox> a37a8c8caf1c79ec82fc3ad0800d74ca661451e3 145 144 2024-05-12T10:36:55Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <data source="dates"> </data> <data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="leader"> <label>Leader</label> </data> <data source="ideology"/> <label>Ideology</label> </data> </infobox> a2ff1e1b8bca34fbb5056db53ce304007c9d5b63 146 145 2024-05-12T12:01:55Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <data source="dates"> </data> <data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="leader"> <label>Leader</label> </data> <data source="ideology"/> <label>Ideology</label> </data> </infobox> 2d587d0dc36ac9b1a0caddc948ac64d08796e5a2 148 146 2024-05-12T12:03:18Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <data source="dates"> </data> <data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="leader"> <label>Leader</label> </data> <data source="ideology"> <label>Ideology</label> </data> </infobox> d2db327306ba4dea1862dfc0a7ad50b300733b10 149 148 2024-05-12T12:04:36Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <data source="dates"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="leader"> <label>Leader</label> </data> <data source="ideology"> <label>Ideology</label> </data> </infobox> 13c3eb9ac0675ee67349ccb4e542bb4d6e0b7190 154 149 2024-05-12T15:39:43Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="dates"> </data> <data source="leader"> <label>Leader</label> </data> <data source="ideology"> <label>Ideology</label> </data> </infobox> 5bc333425293de52609fa012565ad9212eb9eb73 Ngaxaaxakamalahu 0 94 147 2024-05-12T12:02:45Z NoKiAthami 2 Created page with "{{Infobox war faction |nativename = <br>Islamic Group of People for Jihad and Instauration of the Charia on Mangalia |dates = ?-Now |ideology = Islamism fundamentalism }} The '''Ngaxaaxakamalahu'''" wikitext text/x-wiki {{Infobox war faction |nativename = <br>Islamic Group of People for Jihad and Instauration of the Charia on Mangalia |dates = ?-Now |ideology = Islamism fundamentalism }} The '''Ngaxaaxakamalahu''' b35c4320bb9e0894baa72e7bfa56cbe3848a7b51 150 147 2024-05-12T12:42:50Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Sharia'a on Mangalia |dates = ?-Now |ideology = Islamism fundamentalism }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of Sharia'a on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' 467818d21aa2b6bc5f8e6529916e2c1f19289e19 151 150 2024-05-12T12:54:07Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |dates = ?-Now |ideology = Islamism fundamentalism }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of Shari'a on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist organization composed by mangalese Islam converted people whose main goal is convert the people from [[Mangalia]] to an fundamentalistic Islam. e2da99bd8af4594116b7063e3e542b2100c87872 153 151 2024-05-12T15:37:55Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxamalahu_flag.svg |dates = ?-Now |ideology = Islamism fundamentalism }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of Shari'a on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is convert the people from [[Mangalia]] to an fundamentalistic Islam. 8c47b15918eb84fdb4f9bef2bb70d86a6e6d0400 File:Ngaxaaxakamalahu Flag.svg 6 95 152 2024-05-12T15:36:12Z NoKiAthami 2 wikitext text/x-wiki The flag of the Ngaxaaxakamalahu 2217116843fa0ca3a34b891bf9a251e0a4592b4b Ngaxaaxakamalahu 0 94 155 153 2024-05-12T16:16:09Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxakamalahu Flag.svg |imagesub = Flag |dates = ?-Now |ideology = Islamism fundamentalism }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of Shari'a on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is convert the people from [[Mangalia]] to an fundamentalistic Islam. b2bda91658f447ae18a523a2969458691f389793 159 155 2024-05-12T21:26:36Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxakamalahu Flag.svg |imagesub = Flag |dates = ?-Now |activeregion = [https://en.wikipedia.org/wiki/Indonesia Indonesia] |ideology = [https://en.wikipedia.org/wiki/Islamism_fundamentalism Islamism fundamentalism]<br> [https://en.wikipedia.org/wiki/Salafi_Jihadism Salafi Jihadism]<br> [https://en.wikipedia.org/wiki/Wahhabism Wahhabism]<br> [https://en.wikipedia.org/wiki/Anti-Christian_sentiment Anti-Christianism]<br> [https://en.wikipedia.org/wiki/Anti-Western_sentiment Anti-Westernism] }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of Shari'a on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is convert the people from [[Mangalia]] to an fundamentalistic Islam. 72a6b92d5156f4f3de83d98fa9f4777ee84c5e2c 177 159 2024-05-13T11:04:12Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxakamalahu Flag.svg |imagesub = Flag |dates = ?-Now |activeregion = [https://en.wikipedia.org/wiki/Indonesia Indonesia] |ideology = [https://en.wikipedia.org/wiki/Islamism_fundamentalism Islamism fundamentalism]<br> [https://en.wikipedia.org/wiki/Salafi_Jihadism Salafi Jihadism]<br> [https://en.wikipedia.org/wiki/Wahhabism Wahhabism]<br> [https://en.wikipedia.org/wiki/Anti-Christian_sentiment Anti-Christianism]<br> [https://en.wikipedia.org/wiki/Anti-Western_sentiment Anti-Westernism] }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of [https://en.wikipedia.org/wiki/shari'a Shari'a] on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is to convert people from [[Mangalia]] to an fundamentalistic Islam and to overthrone the government in order to establish the Shari'a. 3a977a65d15b7f2ee6e0f838ca4456037eea81dc 178 177 2024-05-13T11:25:45Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxakamalahu Flag.svg |imagesub = Flag |dates = ?-Now |activeregion = [https://en.wikipedia.org/wiki/Indonesia Indonesia] |ideology = [https://en.wikipedia.org/wiki/Islamism_fundamentalism Islamism fundamentalism]<br> [https://en.wikipedia.org/wiki/Salafi_Jihadism Salafi Jihadism]<br> [https://en.wikipedia.org/wiki/Wahhabism Wahhabism]<br> [https://en.wikipedia.org/wiki/Anti-Christian_sentiment Anti-Christianism]<br> [https://en.wikipedia.org/wiki/Anti-Western_sentiment Anti-Westernism] }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of [https://en.wikipedia.org/wiki/shari'a Shari'a] on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is to convert people from [[Mangalia]] to an fundamentalistic Islam and to overthrone the government in order to establish the Shari'a. y ==Origins== The leader of the group came from a family of mangalese immigrants to Indonesia. fd11b29ad2606d55c9a67b94a25a776eb4650667 182 178 2024-05-13T12:51:33Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxakamalahu Flag.svg |imagesub = Flag |dates = ?-Now |activeregion = [https://en.wikipedia.org/wiki/Indonesia Indonesia] |ideology = [https://en.wikipedia.org/wiki/Islamism_fundamentalism Islamism fundamentalism]<br> [https://en.wikipedia.org/wiki/Salafi_Jihadism Salafi Jihadism]<br> [https://en.wikipedia.org/wiki/Wahhabism Wahhabism]<br> [https://en.wikipedia.org/wiki/Anti-Christian_sentiment Anti-Christianism]<br> [https://en.wikipedia.org/wiki/Anti-Western_sentiment Anti-Westernism] }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of [https://en.wikipedia.org/wiki/shari'a Shari'a] on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is to convert people from [[Mangalia]] to an fundamentalistic Islam and to overthrone the government in order to establish the Shari'a. ==Origins== The leader of the group came from a family of mangalese immigrants to Indonesia. 1ad0cd057263f3f49cda12ebea78da6a0d3e88d4 183 182 2024-05-13T15:53:02Z NoKiAthami 2 /* Origins */ wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنجَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxakamalahu Flag.svg |imagesub = Flag |dates = ?-Now |activeregion = [https://en.wikipedia.org/wiki/Indonesia Indonesia] |ideology = [https://en.wikipedia.org/wiki/Islamism_fundamentalism Islamism fundamentalism]<br> [https://en.wikipedia.org/wiki/Salafi_Jihadism Salafi Jihadism]<br> [https://en.wikipedia.org/wiki/Wahhabism Wahhabism]<br> [https://en.wikipedia.org/wiki/Anti-Christian_sentiment Anti-Christianism]<br> [https://en.wikipedia.org/wiki/Anti-Western_sentiment Anti-Westernism] }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharia3a bil-Manjaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بالمنجلية, lit. 'Islamic Group of People for Jihad and the Establishment of [https://en.wikipedia.org/wiki/shari'a Shari'a] on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is to convert people from [[Mangalia]] to an fundamentalistic Islam and to overthrone the government in order to establish the Shari'a. ==Origins== The leader of the group, came from a family of mangalese immigrants to Indonesia, a country mostly Muslim. Later he converted c71835e2af836321f9a94fe37ca70c07ea8b3395 184 183 2024-05-13T16:12:51Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنغَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxakamalahu Flag.svg |imagesub = Flag |dates = ?-Now |activeregion = [https://en.wikipedia.org/wiki/Indonesia Indonesia] |ideology = [https://en.wikipedia.org/wiki/Islamism_fundamentalism Islamism fundamentalism]<br> [https://en.wikipedia.org/wiki/Salafi_Jihadism Salafi Jihadism]<br> [https://en.wikipedia.org/wiki/Wahhabism Wahhabism]<br> [https://en.wikipedia.org/wiki/Anti-Christian_sentiment Anti-Christianism]<br> [https://en.wikipedia.org/wiki/Anti-Western_sentiment Anti-Westernism] }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharī3a bil-Manghaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنغَلِيَة, lit. 'Islamic Group of People for Jihad and the Establishment of [https://en.wikipedia.org/wiki/shari'a Shari'a] on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is to convert people from [[Mangalia]] to a fundamentalistic Islam and to overthrone the government in order to establish the Shari'a. ==Origins== The leader of the group, came from a family of mangalese immigrants to Indonesia, a country mostly Muslim. Later he converted 52ed611c1e0e8ff55a6df712db41ab73dcd17fd2 185 184 2024-05-13T18:50:24Z NoKiAthami 2 wikitext text/x-wiki {{Infobox war faction |nativename = جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنغَلِيَة<br>Islamic Group of People for Jihad and the Establishment of the Shari'a on Mangalia |image = Ngaxaaxakamalahu Flag.svg |imagesub = Flag |dates = ?-Now |activeregion = [https://en.wikipedia.org/wiki/Indonesia Indonesia] |ideology = [https://en.wikipedia.org/wiki/Islamism_fundamentalism Islamism fundamentalism]<br> [https://en.wikipedia.org/wiki/Salafi_Jihadism Salafi Jihadism]<br> [https://en.wikipedia.org/wiki/Wahhabism Wahhabism]<br> [https://en.wikipedia.org/wiki/Anti-Christian_sentiment Anti-Christianism]<br> [https://en.wikipedia.org/wiki/Anti-Western_sentiment Anti-Westernism] }} '''''Jamā3at islāmiyya 'ahl lil-jihad watā'sīs ash-sharī3a bil-Manghaliyya''''' (In Arabic: جماعة إسلامية أهل للجهاد وتأسيس الشريعة بِالمَنغَلِيَة, lit. 'Islamic Group of People for Jihad and the Establishment of [https://en.wikipedia.org/wiki/shari'a Shari'a] on Mangalia') or mainly known as '''Ngaxaaxakamalahu''' (From mangalese ''Ngaxaaxakama'', "Warriors" and "Alahu" which comes from Arabic الله ''Allah(u)'', "God") is a terrorist group composed by mangalese converted to [https://en.wikipedia.org/wiki/Islam Islam] people whose main goal is to convert people from [[Mangalia]] to a fundamentalistic Islam and to overthrone the government in order to establish the Shari'a. ==Origins== The leader of the group, came from a family of mangalese immigrants to Indonesia, a country mostly Muslim. Later he converted 62cecb35bfa048ed4f22af766d1831369910f402 Module:Babel 828 96 156 2024-05-12T19:12:27Z NoKiAthami 2 Created page with "local p = {} local getArgs local function showUserbox(frame, v, nocat) local maybeNocat = '' if nocat then maybeNocat = '|nocat=yes' end return frame:preprocess('{{User ' .. v .. maybeNocat .. '}}') end function p.main(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end local args = getArgs(frame, { wrappers = 'Template:Babel' }) local ret = mw.html.create('table') :attr('role', 'presentation') :addClass('userboxes') :cs..." Scribunto text/plain local p = {} local getArgs local function showUserbox(frame, v, nocat) local maybeNocat = '' if nocat then maybeNocat = '|nocat=yes' end return frame:preprocess('{{User ' .. v .. maybeNocat .. '}}') end function p.main(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end local args = getArgs(frame, { wrappers = 'Template:Babel' }) local ret = mw.html.create('table') :attr('role', 'presentation') :addClass('userboxes') :css({ float = args.align or 'right', ['margin-left'] = (args.left or '1') .. 'em', ['margin-bottom'] = (args.bottom or '0') .. 'em', width = (args.width or '248') .. 'px', clear = args.align or 'right', color = args.textcolor or '#000000', border = (args.bordercolor or '#99B3FF') .. ' solid ' .. (args.solid or 1) .. 'px' }) local nocat = args.nocat and string.lower(args.nocat) == 'yes' if args.shadow and string.lower(args.shadow) == 'yes' then ret:css({ ['box-shadow'] = '0 2px 4px rgb(0, 0, 0, 0.2)' }) end ret:cssText(args['extra-css'] or '') local color = args.color or 'inherit' local row1 = ret:tag('tr') local row2 = ret:tag('tr') local row3 = ret:tag('tr') local body_cells = row2:tag('td') :css('vertical-align', 'middle !important') local userboxes -- Special message for when first argument is blank; otherwise treat it as normal if args[1] and args[1]:find('%S') then userboxes = showUserbox(frame, args[1], nocat) else userboxes = args.noboxestext or "''You haven't set up any languages. Please see [[:en:Template:Babel/doc|the template's documentation]] for help.''" end body_cells:wikitext(userboxes) -- "remove" args[1] so it isn't looked at in the loop -- table.remove(args,1) doesn't produce desired result args[1] = '' -- Keep track of how many columns are in this table local col_span = 1 for _, v in ipairs(args) do -- ! indicates a new cell should be created if v:find('%S') and v ~= '!' then body_cells:wikitext(showUserbox(frame, v, nocat)) -- Recycling body_cells for <td> elseif v and v == '!' then col_span = col_span + 1 body_cells:done() body_cells = row2:tag('td') end end row1:tag('th') :attr('colspan', col_span) :css({ ['background-color'] = color, ['text-align'] = 'center' }) :wikitext(args.header or '[[:m:User language|User language]]') :done() row3:tag('td') :attr('colspan', col_span) :css({ ['background-color'] = color, ['text-align'] = 'center' }) :wikitext(args.footer or '[[:Category:Users by language|Search user languages]]') :done() if args['special-boxes'] then body_cells:wikitext(args['special-boxes']) end body_cells:done() return tostring(ret) end return p d8e446c8d4e08a47d108e43a55645144eb89818c Template:Bable 10 97 157 2024-05-12T19:12:47Z NoKiAthami 2 Created page with "{{#invoke:Babel|main}}<noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki {{#invoke:Babel|main}}<noinclude> {{documentation}} </noinclude> d9de77e4db62a81edc6f720d69dfb154ce22bbb4 Template:Infobox war faction 10 93 158 154 2024-05-12T19:17:57Z NoKiAthami 2 wikitext text/x-wiki <infobox> <title source="name"> <default>{{PAGENAME}}</default> </title> <data source="nativename"> </data> <data source="nativename2"> </data> <image source="image" /> <data source="imagesub"> </data> <image source="image2" /> <data source="imagesub2"> </data> <data source="dates"> </data> <data source="leader"> <label>Leader</label> </data> <data source="headquarter"> <label>Headquarter(s)</label> </data> <data source="activeregion"> <label>Active region(s)</label> </data> <data source="war"> <label>War(s)</label> </data> <data source="ideology"> <label>Ideology</label> </data> </infobox> 7f2ea48a48b8b187ea479698a8c0756d61e47a35 Mangalic Language Family 0 63 160 107 2024-05-13T05:58:35Z NoKiAthami 2 wikitext text/x-wiki The '''Mangalic languages''' are a group of languages spoken mainly by the inhabitants of the Western island of [[Mangalitia]]. == Mangalic family tree == {{Tree list|title=Mangalic family}} * [[Proto-Mangalic]] ** Western Mangalic *** Balopoan of Biatuna **** Central Balopoan languages ***** Möna ***** Ra'i ****** Mi ***** T'umpa ****** Pants ****** Rhiani *** Kaonese *** Western Balopoan languages **** Bami ***** Muk **** Chòn'ý ** Eastern Mangalic *** Ancient Mangalese **** [[Mangalese]] ***** Northern Dialects ***** Southern Dialects *** Ancient Laoanese **** Laoanese continuum ***** Kimiatsio Laoanese ***** Marean ***** Apaxo† {{Tree list/end}} 84537e9bc093dff942ef234193a06436e5bd2170 161 160 2024-05-13T05:59:37Z NoKiAthami 2 /* Mangalic family tree */ wikitext text/x-wiki The '''Mangalic languages''' are a group of languages spoken mainly by the inhabitants of the Western island of [[Mangalitia]]. == Mangalic family tree == {{Tree list|title=Mangalic family}} * [[Proto-Mangalic]] ** Western Mangalic *** Balopoan of Biatuna **** Central Balopoan languages ***** Möna ***** Ra'i ****** Mi ***** T'umpa ****** Pants ****** Rhiani *** Kaonese *** Western Balopoan languages **** Bami ***** Muk **** Chòn'ý ** Eastern Mangalic *** Ancient Mangalese **** [[Mangalese_Language|Mangalese]] ***** Northern Dialects ***** Southern Dialects *** Ancient Laoanese **** Laoanese continuum ***** Kimiatsio Laoanese ***** Marean ***** Apaxo† {{Tree list/end}} 20709d670f40b9f9e21c63de9099a41b16093c5d 201 161 2024-05-16T14:23:41Z NoKiAthami 2 /* Mangalic family tree */ wikitext text/x-wiki The '''Mangalic languages''' are a group of languages spoken mainly by the inhabitants of the Western island of [[Mangalitia]]. == Mangalic family tree == {{Tree list|title=Mangalic family}} * [[Proto-Mangalic]] ** Western Mangalic *** Balopoan of Biatuna *** Central Balopoan languages **** Möna **** Ra'i ***** Mi **** T'umpa ***** Pants ***** Rhiani *** Kaonese *** Western Balopoan languages **** Bami ***** Muk **** Chòn'ý ** Eastern Mangalic *** Ancient Mangalese **** [[Mangalese_Language|Mangalese]] ***** Northern Dialects ***** Southern Dialects *** Ancient Laoanese **** Laoanese continuum ***** Kimiatsio Laoanese ***** Marean ***** Apaxo† {{Tree list/end}} 04140414d72ed102dd35a31b56b14800de1a73a2 Mangalia 0 5 162 142 2024-05-13T06:04:48Z NoKiAthami 2 /* Divisions - Administration */ wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Northern region |- ! colspan ="3" | Northern region ! Provinces !! Capitals !! Blasons |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP ! |} {| class="wikitable" |+ Central region |- ! Provinces !! Capitals !! Blasons |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |} {| class="wikitable" |+ Southern region |- ! Provinces !! Capitals !! Blasons |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} [[Category: Mangalitia]] [[Category: Mangalia]] fbb22f475d3368beba6dbe2f4fb50c9ddbafff24 163 162 2024-05-13T06:07:55Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Northern region |- ! colspan ="3" | Northern region |- ! Provinces !! Capitals !! Blasons |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |- ! colspan = "3" | Central region |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |- ! colspan = "3" | Southern region |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} [[Category: Mangalitia]] [[Category: Mangalia]] 2b52e38a588ca4597b36fd88f779949d670d1513 164 163 2024-05-13T06:10:29Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or ''Piukama''/''Piuqoakama''. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Provinces |- ! Provinces !! Capitals !! Blasons |- ! colspan ="3" | Northern region |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |- ! colspan = "3" | Central region |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |- ! colspan = "3" | Southern region |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} [[Category: Mangalitia]] [[Category: Mangalia]] f55e999244852410fdcac814c4318fb5c5309463 165 164 2024-05-13T06:41:55Z NoKiAthami 2 wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or [[Piukama|''Piukama''/''Piuqoakama'']]. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Provinces |- ! Provinces !! Capitals !! Blasons |- ! colspan ="3" | Northern region |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |- ! colspan = "3" | Central region |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |- ! colspan = "3" | Southern region |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} [[Category: Mangalitia]] [[Category: Mangalia]] 07bf86ff348577491ffea9ecd93e6688cc4550d0 203 165 2024-05-16T14:29:57Z NoKiAthami 2 /* Beginning of Empire */ wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or [[Piukama|''Piukama''/''Piuqoakama'']]. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], in 1973 BC, became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Provinces |- ! Provinces !! Capitals !! Blasons |- ! colspan ="3" | Northern region |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |- ! colspan = "3" | Central region |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |- ! colspan = "3" | Southern region |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} [[Category: Mangalitia]] [[Category: Mangalia]] f1a2242bec4dd69477cc578aafbf74f814f6163d 204 203 2024-05-16T14:36:17Z NoKiAthami 2 /* Beginning of Empire */ wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or [[Piukama|''Piukama''/''Piuqoakama'']]. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] of Piapao, whose name was [[Pailamu]], in 1973 BC, became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. === The Two Mangalias === AD 248, the Southern part of Mangalia gain independence and form a Kingdom separated. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Provinces |- ! Provinces !! Capitals !! Blasons |- ! colspan ="3" | Northern region |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |- ! colspan = "3" | Central region |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |- ! colspan = "3" | Southern region |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} [[Category: Mangalitia]] [[Category: Mangalia]] 2f0575296fa121818e7e3c58b1f5a5e20fd3502b Piukama 0 45 166 108 2024-05-13T07:11:45Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == {{hiden begin|title="Pawanat of Piapao before imperial era"}} {{Tree list}} * Khi '''(1)''' (2045-2022 BCE) ** Muntsa '''(2)''' (2022-2020 BCE) ** Hup '''(3)''' (2020-1989 BCE) *** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{Tree list}} * Pailamu (1973-1962 BCE) ** Shukhi ** Hup II ** Amia {{Tree list/end}} {{hiden end}} 37fe480ed9e8aee169856cafec8cdbcb99f1ab0c 167 166 2024-05-13T07:12:29Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == {{hidden begin|title="Pawanat of Piapao before imperial era"}} {{Tree list}} * Khi '''(1)''' (2045-2022 BCE) ** Muntsa '''(2)''' (2022-2020 BCE) ** Hup '''(3)''' (2020-1989 BCE) *** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{Tree list}} * Pailamu (1973-1962 BCE) ** Shukhi ** Hup II ** Amia {{Tree list/end}} {{hidden end}} 79ade440c7c694d9aeae65e38c4ae6ac4c0b7d57 168 167 2024-05-13T07:14:25Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == The first dynasty of Emperor came from the Pawanat of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawanat of Piapao before imperial era"}} {{Tree list}} * Khi '''(1)''' (2045-2022 BCE) ** Muntsa '''(2)''' (2022-2020 BCE) ** Hup '''(3)''' (2020-1989 BCE) *** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{Tree list}} * Pailamu (1973-1962 BCE) ** Shukhi ** Hup II ** Amia {{Tree list/end}} {{hidden end}} f66b3eb7b0cefb3c788c9cc6e01f15b05a1e78b7 169 168 2024-05-13T07:15:42Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == The first dynasty of Emperor came from the Pawanat of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawanat of Piapao before imperial era"}} {{Tree list}} * Khi '''(1)''' (2045-2022 BCE) ** Muntsa '''(2)''' (2022-2020 BCE) ** Hup '''(3)''' (2020-1989 BCE) *** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu (1973-1962 BCE) ** Shukhi ** Hup II ** Amia {{Tree list/end}} {{hidden end}} b8855006cc39c7858b963197ad6adb274a0bbffd 170 169 2024-05-13T07:20:59Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == The first dynasty of Emperor came from the Pawanat of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawanat of Piapao before imperial era"}} {{Tree list}} * Khi '''(1)''' (2045-2022 BCE) ** Muntsa '''(2)''' (2022-2020 BCE) ** Hup '''(3)''' (2020-1989 BCE) *** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' ** Hup II '''(3)''' *** Parow '''(9)''' **** ? '''(10)''' **** Hup III '''(11)''' **** ** Amia '''(4)''' *** Kima '''(5)''' **** Amia II '''(6)''' ***** ? '''(7)''' ***** ? '''(8)''' {{Tree list/end}} {{hidden end}} 410328c0dc933839bba35b32280894125f65950e 171 170 2024-05-13T07:21:40Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == The first dynasty of Emperor came from the Pawanat of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawanat of Piapao before imperial era"}} {{Tree list}} * Khi '''(1)''' (2045-2022 BCE) ** Muntsa '''(2)''' (2022-2020 BCE) ** Hup '''(3)''' (2020-1989 BCE) *** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' ** Hup II '''(3)''' *** Parow '''(9)''' **** ? '''(10)''' **** Hup III '''(11)''' **** Shukhi II '''(12)''' ** Amia '''(4)''' *** Kima '''(5)''' **** Amia II '''(6)''' ***** ? '''(7)''' ***** ? '''(8)''' {{Tree list/end}} {{hidden end}} cca46cd3f791a3ff145722f8140e8bdcd370ff28 172 171 2024-05-13T09:49:45Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == The first dynasty of Emperor came from the Pawanat of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawanat of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' ** Hup II '''(3)''' *** Parow '''(9)''' **** ? '''(10)''' **** Hup III '''(11)''' **** Shukhi II '''(12)''' ** Amia '''(4)''' *** Kima '''(5)''' **** Amia II '''(6)''' ***** ? '''(7)''' ***** ? '''(8)''' {{Tree list/end}} {{hidden end}} 30b8e2a21f35e9b9a946e275916e408fef39a36e 173 172 2024-05-13T09:53:08Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == The first dynasty of Emperor came from the [[Pawa|Pawanat]] of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawanat of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' ** Hup II '''(3)''' *** Parow '''(9)''' **** ? '''(10)''' **** Hup III '''(11)''' **** Shukhi II '''(12)''' ** Amia '''(4)''' *** Kima '''(5)''' **** Amia II '''(6)''' ***** ? '''(7)''' ***** ? '''(8)''' {{Tree list/end}} {{hidden end}} 02fc6af8f2611db27824e48276440883785739a6 174 173 2024-05-13T10:02:12Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". == First Emperor == The first dynasty of Emperor came from the [[Pawa|Pawadom]] of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawadom of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' ** Hup II '''(3)''' *** Parow '''(9)''' **** ? '''(10)''' **** Hup III '''(11)''' **** Shukhi II '''(12)''' ** Amia '''(4)''' *** Kima '''(5)''' **** Amia II '''(6)''' ***** ? '''(7)''' ***** ? '''(8)''' {{Tree list/end}} {{hidden end}} 252862c9017f7ba4708060a8e95773b70cd0b3b9 175 174 2024-05-13T10:22:13Z NoKiAthami 2 wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Different from must monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the first born, but for being the fist of their siblings to have a child. == First Emperor == The first dynasty of Emperor came from the [[Pawa|Pawadom]] of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawadom of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' ** Hup II '''(3)''' *** Parow '''(9)''' **** ? '''(10)''' **** Hup III '''(11)''' **** Shukhi II '''(12)''' ** Amia '''(4)''' *** Kima '''(5)''' **** Amia II '''(6)''' ***** ? '''(7)''' ***** ? '''(8)''' {{Tree list/end}} {{hidden end}} fcad3ba68095acc8864aa71d18d09087dbc9bff3 176 175 2024-05-13T10:26:05Z NoKiAthami 2 wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Different from must monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the first born, but for being the fist of their siblings to have a child. Another difference is that there are no male-preference for being Piukama. Any children of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperor came from the [[Pawa|Pawadom]] of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawadom of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' ** Hup II '''(3)''' *** Parow '''(9)''' **** ? '''(10)''' **** Hup III '''(11)''' **** Shukhi II '''(12)''' ** Amia '''(4)''' *** Kima '''(5)''' **** Amia II '''(6)''' ***** ? '''(7)''' ***** ? '''(8)''' {{Tree list/end}} {{hidden end}} 5ce56ff2cb60ca07b40634572d697bd885ebeca4 179 176 2024-05-13T11:30:25Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Different from must monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the first born, but for being the fist of their siblings to have a child. Another difference is that there are no male-preference for being Piukama. Any children of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperor came from the [[Pawa|Pawate]] of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' ** Hup II '''(3)''' *** Parow '''(9)''' **** ? '''(10)''' **** Hup III '''(11)''' **** Shukhi II '''(12)''' ** Amia '''(4)''' *** Kima '''(5)''' **** Amia II '''(6)''' ***** ? '''(7)''' ***** ? '''(8)''' {{Tree list/end}} {{hidden end}} c15347a5fdfb01238e04cab446a26829ea9d5e23 188 179 2024-05-15T21:10:16Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Different from must monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the first born, but for being the fist of their siblings to have a child. Another difference is that there are no male-preference for being Piukama. Any children of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperor came from the [[Pawa|Pawate]] of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' (1962-1962 BCE) ** Hup II '''(3)''' (1962-1959 BCE) *** Parow '''(7)''' (1883-1882 BCE) **** Fafawra '''(8)''' (1882-1857 BCE) ***** Budaa '''(9)''' (1857-1837 BCE) ****** Fatambabaia '''(10)''' ** Amia '''(4)''' (1959-1945 BCE) *** Kima '''(5)''' (1945-1935 BCE) **** Amia II '''(6)''' (1935-1883 BCE) {{Tree list/end}} {{hidden end}} a0556b39d029929e5f9dcb17473943b0881a7321 189 188 2024-05-15T21:53:16Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Different from must monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the first born, but for being the fist of their siblings to have a child. Another difference is that there are no male-preference for being Piukama. Any children of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperor came from the [[Pawa|Pawate]] of [[Piapao]] which started gain power and anexed other city-states. {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' (1962-1962 BCE) ** Hup II '''(3)''' (1962-1959 BCE) *** Parow '''(7)''' (1883-1882 BCE) **** Fafawra '''(8)''' (1882-1857 BCE) ***** Budaa '''(9)''' (1857-1837 BCE) ****** Fatambabaia '''(10)''' ** Amia '''(4)''' (1959-1945 BCE) *** Kimawe '''(5)''' (1945-1935 BCE) **** Amia II '''(6)''' (1935-1883 BCE) {{Tree list/end}} {{hidden end}} d316d16d075d168263daaec8709ae39979d53154 190 189 2024-05-15T22:04:42Z NoKiAthami 2 wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BCE) *** Muntsa '''(2)''' (2022-2020 BCE) *** Hup '''(3)''' (2020-1989 BCE) **** Pailamu '''(4)''' (1989-1973 BCE) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BCE) ** Shukhi '''(2)''' (1962-1962 BCE) ** Hup II '''(3)''' (1962-1959 BCE) *** Parow '''(7)''' (1883-1882 BCE) **** Fafawra '''(8)''' (1882-1857 BCE) ***** Budaa '''(9)''' (1857-1837 BCE) ****** Fatambabaia '''(10)''' ** Amia '''(4)''' (1959-1945 BCE) *** Kimawe '''(5)''' (1945-1935 BCE) **** Amia II '''(6)''' (1935-1883 BCE) {{Tree list/end}} {{hidden end}} efa2b09dce9105949b880ad1fc04575d262fac4f 191 190 2024-05-15T23:06:50Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} 4ae988a114fa0699e641a9000ea57bc60d752d4f 192 191 2024-05-16T08:26:37Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Order !! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- ! 1 || Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} e0b5275049703ca4ce61fb8b9e820677d5132fae 193 192 2024-05-16T08:27:47Z NoKiAthami 2 wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Order !! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | 1 !! Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} 034db0edd9ca4fb7a0e1a65a966951e333d13cde 194 193 2024-05-16T08:33:37Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} 4ae988a114fa0699e641a9000ea57bc60d752d4f 195 194 2024-05-16T14:00:56Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} 23259690e28b4c1a0b87fc48a565cd5996f29987 196 195 2024-05-16T14:13:56Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || Due to lack of trustful source, Khi's predecessor emperor is unknown. What it is known is that it was a man. Some sources says it was his own father and some says it was his uncle. |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} adce4757c2818046a91f772e72c35d08ece1930e 197 196 2024-05-16T14:14:43Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || Due to the lack of trustful source, Khi's predecessor pawa's identity is unknown. What it is known is that it was a man. Some sources says it was his own father and some says it was his uncle. |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} 87479b4069c543e68b8781671cabfb6a72932270 198 197 2024-05-16T14:16:57Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || Due to the lack of trustful source, Khi's predecessor pawa's identity is unknown. What it is known is that it was a man. Some sources says it was his own father and some says it was his uncle. |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || Khi's son. Died of a disease. |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} 4d2d8d44563dc554f19f8265f633a569828b8478 199 198 2024-05-16T14:19:08Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || Due to the lack of trustful source, Khi's predecessor pawa's identity is unknown. What it is known is that it was a man. Some sources says it was his own father and some says it was his uncle. |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || Khi's son. Died of a disease. |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. For thirteen years his mother was his regent. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} ff0cf201e9056e40d3a5e1fd7989a051263aab5e 200 199 2024-05-16T14:19:52Z NoKiAthami 2 /* First Emperor */ wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || colspan = "2" | 2022 BC (43) || 23 years || Due to the lack of trustful source, Khi's predecessor pawa's identity is unknown. What it is known is that it was a man. Some sources says it was his own father and some says it was his uncle. |- | Muntsa || 2043 BC || 2022 BC (21) || colspan = "2" | 2020 BC (23) || 2 years || Khi's son. Died of a disease. |- | Hup || 2039 BC || 2020 BC (19) || colspan = "2" | 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 1962 BC (63) || 16 years || |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Crowning !! End !! Death !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || colspan = "2" | 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || colspan = "2" | 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || colspan = "2" | 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || colspan = "2" | 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || colspan = "2" | 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || colspan = "2" | 1883 BC (58) || 51 years || Kimawe's daughter. For thirteen years his mother was his regent since he was 6 when crowned. |- | Parow || 1959 BC || 1883 BC (76) || colspan = "2" | 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || colspan = "2" | 1857 BC (58) || 25 years || Parow's son |- |Budaa || 1882 BC || 1857 BC (25) || colspan = "2" | 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || colspan = "2" | 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} 30cb5241fba8e38cb58ed7a8ea57a2214bdddcf5 Nuboku Language 0 98 180 2024-05-13T11:50:54Z NoKiAthami 2 Created page with "{{Infobox language |nativename = ''Nuboku''? |native = [[Laoamia]] |ethnicity = [[Nuboku People]] |family = Unclassified |earlyforms = Proto-Nuboku?<br>[[Paleo-Kaipan]]? }} The '''Nuboku language''' is a poorly known language from the Nuboku people of the [[Sapuja Islands]]." wikitext text/x-wiki {{Infobox language |nativename = ''Nuboku''? |native = [[Laoamia]] |ethnicity = [[Nuboku People]] |family = Unclassified |earlyforms = Proto-Nuboku?<br>[[Paleo-Kaipan]]? }} The '''Nuboku language''' is a poorly known language from the Nuboku people of the [[Sapuja Islands]]. fd956960dd43ff1bf3782c0c0f73a41eec4e81c2 181 180 2024-05-13T12:10:30Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Nuboku''? |native = [[Laoamia]] |ethnicity = [[Nuboku People]] |family = Unclassified |earlyforms = Proto-Nuboku?<br>[[Paleo-Kaipan Language|Paleo-Kaipan]]? }} The '''Nuboku language''' is a poorly known language from the Nuboku people of the [[Sapuja Islands]]. f944b01fa92bf212c78913de076e003ef09be9ea 186 181 2024-05-14T06:00:58Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Nuboku''? |native = [[Laoamia]] |ethnicity = [[Nuboku People]] |family = Unclassified<br>mangalic? |earlyforms = Proto-Nuboku?<br>[[Paleo-Kaipan Language|Paleo-Kaipan]]?<br>[[Proto-Mangalic Language|Proto-Mangalic]]? }} The '''Nuboku language''' is a poorly known language from the Nuboku people of the [[Sapuja Islands]]. 082c96b9860ebc45cb6eb82c592cde261c3c1c89 187 186 2024-05-14T06:03:34Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ''Nuboku''? |native = [[Laoamia]] |ethnicity = [[Nuboku People]] |family = Unclassified<br>mangalic? |earlyforms = Proto-Nuboku?<br>[[Paleo-Kaipan Language|Paleo-Kaipan]]?<br>[[Proto-Mangalic Language|Proto-Mangalic]]? }} The '''Nuboku language''' is a poorly known language from the [[Nuboku People|Nuboku people]] of the [[Sapuja Islands]]. bf5cacae4529c0c9e301c4d26763c578d7285173 Uraxaalaparang 0 8 202 27 2024-05-16T14:26:51Z NoKiAthami 2 wikitext text/x-wiki {{Infobox settlement |name = Uraxaalaparang |province = [[Tanilaparang]] |ruler = Emperor Kauk (Political leader, since 2016)<br>[[Great Priest of Uraxaalaparang]] [[Tahlanu]] (Religious leader) }} '''Uraxaalaparang''', formerly known as '''Whiaka''' is the political capital and religious capital of [[Mangalia]]. ==History== ===Reunion of the two Mangalias=== After centuries of scission, the [[Northern Mangalia|Northern]] and [[Southern Mangalia|Southern]] Mangalias reunited and decided a new Capital city for the empire. The main goal of choosing a new Capital instead of choosing one of the capitals of each former state, [[Piapao]] on Northern Mangalia, or [[Tsinaa]] on Southern Mangalia, is not to cause any other scission or war. If, for example, Piapao was chosen, it would be implied that Northern Mangalia was the "winner" and vice-versa. The chosen city was Whiaka and was then given a new name: ''Uraxaalaparang'' - "the World's centre" or literally "the World's navel". 170c538ba235f8b7ce75d6478208ddb5b734b34e Mangalia 0 5 205 204 2024-05-17T17:36:39Z NoKiAthami 2 /* Beginning of Empire */ wikitext text/x-wiki {{Infobox country |name = '''Empire of Mangalia''' |nativename = Mangalelakuara ([[Mangalese Language|Mangalese]]) |dates = 1973 BCE-Now |image = Mangalia_Flag.png |imagesub = Flag |image2 = Mangalia map 2.svg |imagesub2 = Map |capital = [[Itsi]] (former), [[Piapao]] (former northern), [[Tsinaa]] (former southern), [[Uraxaalaparang|Uraxaalaparang]] (current) |offlangs = [[Mangalese Language|Mangalese]], [[Mauri Karaka|Mauri Karaka]] |comlangs = [[Laoanese Language]], [[Komishinite Language]] |demonyms = Mangalese |government = Absolute monarchy |firstking = [[Pailamu|Piukama Pailamu]] (2025-1973-1962 BCE) |lastking = [[Kauk|Piukama Kauk]] (1989-2016-Now) |currency = [[Amakilapulonesh]] }} The '''Mangalia''' or '''Mangalese Empire''' (in [[Mangalese Language|Mangalese]] ''Mangalelakuara'') is one of the nations on the [[Kaipan archipelago|Kaipan archipelago]]. It's an absolute monarchy ruled by an Emperor/Empress or [[Piukama|''Piukama''/''Piuqoakama'']]. == Name == Mangalia comes from Mangalese, which comes from the root mangalese word ''Mangale-'' and from [[Mangala Valley|Mangala]], the name of a valley that the Mangalese people believe was the original place where the first man and woman came. == History == === Beginning of Empire === Many city-states begin to gain power and establish their kingdoms. Each kingdom is ruled by a Pawa or lord/king. One of the more powerful is the City of Piapao, which starts to assimilate other kingdoms. The [[Pawa]] [[Piapao|of Piapao]], whose name was [[Pailamu]], in 1973 BC, became the first Piukama, and all the other Pawas became the first [[Pakama|Pakamas]] of the modern provinces. === The Two Mangalias === AD 248, the Southern part of Mangalia gain independence and form a Kingdom separated. == Divisions - Administration == Mangalia is divided into three non-administrative regions: the North, Centre, and South. Each region is divided into provinces, with a total of fifteen provinces: thirteen on the main island, one composed of two islands, and one composed of two islands and half an island (the other half belongs to the [[Komishinite Empire]]). The provinces are ruled by a [[Pakama]] or "King", similar to the [https://en.wikipedia.org/wiki/Nomarch Nomarchs] of ancient Egypt. [[File:Mangalia map.svg|thumb|Provinces: 1-[[Aatsulaoparunga]], 2-[[Oloparunga]], 3-[[Whurawhurani]], 4-[[Tanilaparang]], 5-[[Qulaku]], 6-[[Suruniqu]], 7-[[Olobuni]], 8-[[Puna]], 9-[[Gahlani]], 10-[[Basharlakuara]], 11-[[Mawiaikan]], 12-[[Saruna]], 13-[[Babasharhuplalakuara]], 14-[[Babania]], 15-[[Jalapo]]]] {| class="wikitable" |+ Provinces |- ! Provinces !! Capitals !! Blasons |- ! colspan ="3" | Northern region |- | Aatsulaoparunga || Piapao || WIP |- | Oloparunga || Chuqatsi || WIP |- | Whurawhurani || Druiuna || WIP |- ! colspan = "3" | Central region |- | Tanilaparang || Uraxaalaparang || WIP |- | Qulaku || Lakuaralaluma || WIP |- | Suruniqu || Trotoni || WIP |- | Olobuni || Whurama || WIP |- | Puna || Maniaka || WIP |- | Gahlani || Xarii || WIP |- | Basharlakuara|| Suna || WIP |- | Mawiaikan || Talaria || WIP |- ! colspan = "3" | Southern region |- | Saruna || Huuni || WIP |- | Babasharhuplalakuara || Xanijana || WIP |- | Babania || Sira || WIP |- | Jalapo || Tsinaa || WIP |} [[Category: Mangalitia]] [[Category: Mangalia]] 60e7059fee8c8f5c2dd0aec32aaaef625f771db5 Piukama 0 45 206 200 2024-05-20T15:22:26Z NoKiAthami 2 wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Reign start !! Reign end !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || 2022 BC (43) || 23 years || Due to the lack of trustful source, Khi's predecessor pawa's identity is unknown. What it is known is that it was a man. Some sources says it was his own father and some says it was his uncle. |- | Muntsa || 2043 BC || 2022 BC (21) || 2020 BC (23) || 2 years || Khi's son. Died of a disease. |- | Hup || 2039 BC || 2020 BC (19) || 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 16 years || Hup's son. In 1973 BC Pailamu officially ends his Pawate, and became the first Powiu |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Reign start !! Reign end !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || 1883 BC (58) || 51 years || Kimawe's daughter. For thirteen years his mother was his regent since he was 6 when crowned. |- | Parow || 1959 BC || 1883 BC (76) || 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. |- | Fafawra || 1915 BC || 1882 BC (33) || 1857 BC (58) || 25 years || Parow's son |- | Budaa || 1882 BC || 1857 BC (25) || 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} fa3fd2cc5c0c29f9167c772921fd74441e9649c7 207 206 2024-05-26T21:04:35Z NoKiAthami 2 wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Reign start !! Reign end !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || 2022 BC (43) || 23 years || Due to the lack of trustful source, Khi's predecessor pawa's identity is unknown. What it is known is that it was a man. Some sources says it was his own father and some says it was his uncle. |- | Muntsa || 2043 BC || 2022 BC (21) || 2020 BC (23) || 2 years || Khi's son. Died of a disease. |- | Hup || 2039 BC || 2020 BC (19) || 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 16 years || Hup's son. In 1973 BC Pailamu officially ends his Pawate, and became the first Powiu |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Reign start !! Reign end !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || 1883 BC (58) || 51 years || Kimawe's daughter. For thirteen years his mother was his regent since he was 6 when crowned. |- | Parow || 1959 BC || 1883 BC (76) || 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. Since no one knows about the pregnancy of Parow's mother, his aunt, Amia, was crowned instead. After Amia's granddaughter, Amia II, died, Parow became the first-line heir, but at time he was already old, and died 11 months later. |- | Fafawra || 1915 BC || 1882 BC (33) || 1857 BC (58) || 25 years || Parow's son |- | Budaa || 1882 BC || 1857 BC (25) || 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) {{Tree list/end}} {{hidden end}} 8eeeb0cd32c5b7555bb4b0d3b0aab9b456f9f87a 208 207 2024-06-11T16:37:04Z NoKiAthami 2 wikitext text/x-wiki The '''Piukama''' (female: Piuqoakama) is the title given to the ruler of the [[Mangalia|Empire of Mangalia]], which usually is translated as "Emperor". Unlike most monarchies in Europe, when the current ''Piukama'' has many children, their child becomes heir not for being the firstborn but for being the first of their siblings to have a child. Another difference is that there is no male preference for being Piukama. Any child of a Piukama can be heir to the throne. == First Emperor == The first dynasty of Emperors came from the [[Pawa|Pawate]] of [[Piapao]], which started to gain power and annexed other city-states. The first Emperor was Pailamu, Pawa of Piapao, in 1973 BC, and he became the first Powiu ("Great Pawa"; later, the term "Powiu" became "Piu" and then "Piukama"). {| class="wikitable" |+ List of Pawas of Piapao before imperial era |- ! Ruler !! Birth !! Reign start !! Reign end !! Duration !! Notes |- | Khi || 2065 BC || 2045 BC (20) || 2022 BC (43) || 23 years || Due to the lack of trustful source, Khi's predecessor pawa's identity is unknown. What it is known is that it was a man. Some sources says it was his own father and some says it was his uncle. |- | Muntsa || 2043 BC || 2022 BC (21) || 2020 BC (23) || 2 years || Khi's son. Died of a disease. |- | Hup || 2039 BC || 2020 BC (19) || 1989 BC (50) || 31 years || Muntsa's brother who became Powiu since Muntsa didn't have an heir. |- | Pailamu || 2025 BC || 1989 BC (36) || 1973 BC (52) || 16 years || Hup's son. In 1973 BC Pailamu officially ends his Pawate, and became the first Powiu |} {| class="wikitable" |+ List of Powius, first dynasty |- ! Ruler !! Birth !! Reign start !! Reign end !! Duration !! Notes |- | Pailamu || 2025 BC || 1973 BC (52) || 1962 BC (63) || 11 years || |- | Sukhi || 2000 BC || 1962 BC (38) || 1962 BC (38) || 4 months and 9 days || Pailamu's son and Hup II and Amia's brother. Died without an heir |- | Hup II || 1998 BC || 1962 BC (36) || 1959 BC (39) || 3 years || Sukhi and Amia's brother. |- | Amia || 1994 BC || 1959 BC (35) || 1945 BC (49) || 13 years || Sister of the precedent emperors. She assumed the throne before knowing of Hup II's wife's pregnancy and the birth of Parow, son of Hup II. |- | Kimawe || 1969 BC || 1945 BC (24) || 1935 BC (34) || 10 years || Amia's son. |- | Amia II || 1941 BC || 1935 BC (6) || 1883 BC (58) || 51 years || Kimawe's daughter. For thirteen years his mother was his regent since he was 6 when crowned. |- | Parow || 1959 BC || 1883 BC (76) || 1882 BC (76) || 11 months || Hup II's son and Amia II's great-cousin. Since no one knows about the pregnancy of Parow's mother, his aunt, Amia, was crowned instead. After Amia's granddaughter, Amia II, died, Parow became the first-line heir, but at time he was already old, and died 11 months later. |- | Fafawra || 1915 BC || 1882 BC (33) || 1857 BC (58) || 25 years || Parow's son |- | Budaa || 1882 BC || 1857 BC (25) || 1837 BC (45) || 20 years || |- | Fatambabaia || 1855 BC || 1837 BC (18) || 1786 BC (79) || 61 years || |} {{hidden begin|title="Pawate of Piapao before imperial era"}} {{Tree list}} * ? ** Khi '''(1)''' (2045-2022 BC) *** Muntsa '''(2)''' (2022-2020 BC) *** Hup '''(3)''' (2020-1989 BC) **** Pailamu '''(4)''' (1989-1973 BC) {{Tree list/end}} {{hidden end}} {{hidden begin|title="First dynasty"}} {{Tree list}} * Pailamu '''(1)''' (1973-1962 BC) ** Shukhi '''(2)''' (1962-1962 BC) ** Hup II '''(3)''' (1962-1959 BC) *** Parow '''(7)''' (1883-1882 BC) **** Fafawra '''(8)''' (1882-1857 BC) ***** Budaa '''(9)''' (1857-1837 BC) ****** Fatambabaia '''(10)''' (1837-1786 BC) ** Amia '''(4)''' (1959-1945 BC) *** Kimawe '''(5)''' (1945-1935 BC) **** Amia II '''(6)''' (1935-1883 BC) --I will continue on July-- {{Tree list/end}} {{hidden end}} 3b1507b2afa97d3fe91c15bc21d31aaad5a34a67 Paleo-Kaipan Language 0 13 209 51 2024-06-16T11:47:55Z NoKiAthami 2 wikitext text/x-wiki {{Infobox language |nativename = ? |ethnicity = [[Paleo-Kaipan people]] |natnumber = 0 |family = unclassified }} The '''Paleo-Kaipan''' or '''Tsian language''' is a hypothetical language from a people before mangalic arrival on [[Mangalitia island]] or even other [[Kaipan archipelago|Kaipan people]] arrival on other lands. The basis of this hypothesis is some toponyms and hydronyms with names that don't seem to be from any other known mangalic language. == Feautures and basis for the Hypothesis == Many hydronyms are written ending ⟨-i⟩ or ⟨-iy⟩ or are written in two words: Hydronyms in [[Mangalia]]: * ⟨Tsi⟩ - ⟨Tsi i⟩ * ⟨Gai⟩ - ⟨Ga i⟩ * ⟨Tsiki⟩ - ⟨Tsiki i⟩ * ⟨Sui⟩ - ⟨Su i⟩ * ⟨Maai⟩ - ⟨Maa i⟩ * ⟨Liei⟩ - ⟨Lie i⟩ Hydronyms in [[Balopal]]: * ⟨Bei iy⟩ * ⟨Xi iy⟩ * ⟨Ibi i⟩ Some scholars speculate ⟨i⟩ could mean "river" or "waters" while the other part could be the name of the river. Reconstruct it as *i or *ʔi. It is speculated of having an initial glottal stop due to the orthography, especially in mangalese, of some river names. Some old texts have ⟨Tsi i⟩ written with two consecutive ⟨i⟩s, as well as many other hydronyms ending with i (e.g. ⟨Tsiki⟩ - ⟨Tsikii⟩). Mangalese doesn't have a glottal stop, so the mangalese writers could have separated the name of the river and *ʔi to indicate a pause between. f96684bec0d687ab036aa2c6b47f8a8b49272cce